diff options
author | Sverker Eriksson <[email protected]> | 2014-08-29 16:06:20 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2014-10-24 18:12:16 +0200 |
commit | e45a4a8a3797a637a23ad5d660138c021f3ba1b1 (patch) | |
tree | 77966b56c5f9a9a09087558fc0bd0fa65916d43c /erts/emulator/hipe/hipe_stack.h | |
parent | a70f0ce9b34e4db61dacb8db24f9ab5671ed4c8a (diff) | |
download | otp-e45a4a8a3797a637a23ad5d660138c021f3ba1b1.tar.gz otp-e45a4a8a3797a637a23ad5d660138c021f3ba1b1.tar.bz2 otp-e45a4a8a3797a637a23ad5d660138c021f3ba1b1.zip |
erts: Make hipe_{un}reserve_beam_trap_frame INLINE
Diffstat (limited to 'erts/emulator/hipe/hipe_stack.h')
-rw-r--r-- | erts/emulator/hipe/hipe_stack.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/hipe/hipe_stack.h b/erts/emulator/hipe/hipe_stack.h index 66f9f04c73..4cfdb54dd8 100644 --- a/erts/emulator/hipe/hipe_stack.h +++ b/erts/emulator/hipe/hipe_stack.h @@ -108,12 +108,23 @@ extern int hipe_fill_stacktrace(Process*, int, Eterm**); #if 0 && defined(HIPE_NSTACK_GROWS_UP) #define hipe_nstack_start(p) ((p)->hipe.nstack) #define hipe_nstack_used(p) ((p)->hipe.nsp - (p)->hipe.nstack) +#define hipe_nstack_avail(p) ((p)->hipe.nstend - (p)->hipe.nsp) #endif #if defined(HIPE_NSTACK_GROWS_DOWN) #define hipe_nstack_start(p) ((p)->hipe.nsp) #define hipe_nstack_used(p) ((p)->hipe.nstend - (p)->hipe.nsp) +#define hipe_nstack_avail(p) ((unsigned)((p)->hipe.nsp - (p)->hipe.nstack)) #endif +/* ensure that at least nwords words are available on the native stack */ +static __inline__ void hipe_check_nstack(Process *p, unsigned nwords) +{ + extern void hipe_inc_nstack(Process *p); + + while (hipe_nstack_avail(p) < nwords) + hipe_inc_nstack(p); +} + /* * GC support procedures */ |