aboutsummaryrefslogtreecommitdiffstats
path: root/src/stacks.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stacks.h')
-rw-r--r--src/stacks.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stacks.h b/src/stacks.h
index 9d3422f0..265b4047 100644
--- a/src/stacks.h
+++ b/src/stacks.h
@@ -9,6 +9,7 @@ u32 call32(void *func, u32 eax, u32 errret);
extern u8 ExtraStack[], *StackPos;
u32 stack_hop(u32 eax, u32 edx, void *func);
u32 stack_hop_back(u32 eax, u32 edx, void *func);
+int on_extra_stack(void);
struct bregs;
inline void farcall16(struct bregs *callregs);
inline void farcall16big(struct bregs *callregs);
@@ -35,4 +36,13 @@ int wait_preempt(void);
void check_preempt(void);
u32 call32_params(void *func, u32 eax, u32 edx, u32 ecx, u32 errret);
+// Inline functions
+
+// Check if a call to stack_hop_back is needed.
+static inline int
+need_hop_back(void)
+{
+ return on_extra_stack();
+}
+
#endif // stacks.h