aboutsummaryrefslogtreecommitdiffstats
path: root/src/stacks.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-09-29 19:18:25 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-09-30 09:42:55 -0400
commitfabc1b51451b466bc11c9f90814961666a265df8 (patch)
tree9661c9c4f01a891a99cd5e4f11d646ca9a9bb99c /src/stacks.h
parent1389eee20e6dccb5bf2fc92132cdde7b3b92a848 (diff)
downloadseabios-fabc1b51451b466bc11c9f90814961666a265df8.tar.gz
Add need_hop_back() call that determines if stack_hop_back is needed
Also, use need_hop_back() instead of on_extra_stack() in code that determines whether or not to call stack_hop_back(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
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