diff options
author | Lukas Larsson <[email protected]> | 2017-07-12 10:58:19 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2017-07-17 10:01:53 +0200 |
commit | 241f27c4942d6b765abcec9d5a9712e07861bc13 (patch) | |
tree | 4dda3d3f3fa3cb7a344019583b218a252ae708c3 /erts/emulator/hipe/hipe_mode_switch.c | |
parent | a69339d9f8c73d2a0a2369289b464db00c479302 (diff) | |
download | otp-241f27c4942d6b765abcec9d5a9712e07861bc13.tar.gz otp-241f27c4942d6b765abcec9d5a9712e07861bc13.tar.bz2 otp-241f27c4942d6b765abcec9d5a9712e07861bc13.zip |
erts: Cleanup removal of non-smp emulators
Diffstat (limited to 'erts/emulator/hipe/hipe_mode_switch.c')
-rw-r--r-- | erts/emulator/hipe/hipe_mode_switch.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/erts/emulator/hipe/hipe_mode_switch.c b/erts/emulator/hipe/hipe_mode_switch.c index 5775f0730f..fd90c46fa8 100644 --- a/erts/emulator/hipe/hipe_mode_switch.c +++ b/erts/emulator/hipe/hipe_mode_switch.c @@ -36,7 +36,7 @@ #include "hipe_stack.h" #include "hipe_bif0.h" /* hipe_mfa_info_table_init() */ -#if defined(ERTS_ENABLE_LOCK_CHECK) && defined(ERTS_SMP) +#if defined(ERTS_ENABLE_LOCK_CHECK) # define ERTS_SMP_REQ_PROC_MAIN_LOCK(P) \ if ((P)) erts_proc_lc_require_lock((P), ERTS_PROC_LOCK_MAIN, \ __FILE__, __LINE__) @@ -633,6 +633,28 @@ static unsigned hipe_next_nstack_size(unsigned size) return size ? size * 2 : HIPE_INITIAL_NSTACK_SIZE; } +#if 0 && defined(HIPE_NSTACK_GROWS_UP) +void hipe_inc_nstack(Process *p) +{ + Eterm *old_nstack = p->hipe.nstack; + unsigned old_size = p->hipe.nstend - old_nstack; + unsigned new_size = hipe_next_nstack_size(old_size); + Eterm *new_nstack = erts_realloc(ERTS_ALC_T_HIPE, + (char *) old_nstack, + new_size*sizeof(Eterm)); + p->hipe.nstend = new_nstack + new_size; + if (new_nstack != old_nstack) { + p->hipe.nsp = new_nstack + (p->hipe.nsp - old_nstack); + p->hipe.nstack = new_nstack; + if (p->hipe.nstgraylim) + p->hipe.nstgraylim = + new_nstack + (p->hipe.nstgraylim - old_nstack); + if (p->hipe.nstblacklim) + p->hipe.nstblacklim = + new_nstack + (p->hipe.nstblacklim - old_nstack); + } +} +#endif #if defined(HIPE_NSTACK_GROWS_DOWN) void hipe_inc_nstack(Process *p) |