diff options
author | Lukas Larsson <[email protected]> | 2017-07-12 14:56:09 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2017-07-17 10:01:53 +0200 |
commit | a69339d9f8c73d2a0a2369289b464db00c479302 (patch) | |
tree | da01633fa6dc603287e5f4f19db842abdc772d61 /erts/emulator/hipe/hipe_mode_switch.c | |
parent | eaad1be9619109483d85549889c2bf3244d6cfe4 (diff) | |
download | otp-a69339d9f8c73d2a0a2369289b464db00c479302.tar.gz otp-a69339d9f8c73d2a0a2369289b464db00c479302.tar.bz2 otp-a69339d9f8c73d2a0a2369289b464db00c479302.zip |
erts: Remove ERTS_SMP and USE_THREAD defines
This refactor was done using the unifdef tool like this:
for file in $(find erts/ -name *.[ch]); do unifdef -t -f defile -o $file $file; done
where defile contained:
#define ERTS_SMP 1
#define USE_THREADS 1
#define DDLL_SMP 1
#define ERTS_HAVE_SMP_EMU 1
#define SMP 1
#define ERL_BITS_REENTRANT 1
#define ERTS_USE_ASYNC_READY_Q 1
#define FDBLOCK 1
#undef ERTS_POLL_NEED_ASYNC_INTERRUPT_SUPPORT
#define ERTS_POLL_ASYNC_INTERRUPT_SUPPORT 0
#define ERTS_POLL_USE_WAKEUP_PIPE 1
#define ERTS_POLL_USE_UPDATE_REQUESTS_QUEUE 1
#undef ERTS_HAVE_PLAIN_EMU
#undef ERTS_SIGNAL_STATE
Diffstat (limited to 'erts/emulator/hipe/hipe_mode_switch.c')
-rw-r--r-- | erts/emulator/hipe/hipe_mode_switch.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/erts/emulator/hipe/hipe_mode_switch.c b/erts/emulator/hipe/hipe_mode_switch.c index ba7ae1e6a8..5775f0730f 100644 --- a/erts/emulator/hipe/hipe_mode_switch.c +++ b/erts/emulator/hipe/hipe_mode_switch.c @@ -490,14 +490,12 @@ Process *hipe_mode_switch(Process *p, unsigned cmd, Eterm reg[]) case HIPE_MODE_SWITCH_RES_WAIT: case HIPE_MODE_SWITCH_RES_WAIT_TIMEOUT: { /* same semantics, different debug trace messages */ -#ifdef ERTS_SMP /* XXX: BEAM has different entries for the locked and unlocked cases. HiPE doesn't, so we must check dynamically. */ if (p->hipe_smp.have_receive_locks) p->hipe_smp.have_receive_locks = 0; else erts_smp_proc_lock(p, ERTS_PROC_LOCKS_MSG_RECEIVE); -#endif p->i = hipe_beam_pc_resume; p->arity = 0; erts_smp_atomic32_read_band_relb(&p->state, @@ -524,10 +522,8 @@ Process *hipe_mode_switch(Process *p, unsigned cmd, Eterm reg[]) p = erts_schedule(NULL, p, reds_in - p->fcalls); ERTS_SMP_REQ_PROC_MAIN_LOCK(p); ASSERT(!(p->flags & F_HIPE_MODE)); -#ifdef ERTS_SMP p->hipe_smp.have_receive_locks = 0; reg = p->scheduler_data->x_reg_array; -#endif } { Eterm *argp; @@ -637,28 +633,6 @@ 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) |