aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/hipe/hipe_mode_switch.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-03-21 11:54:28 +0100
committerGitHub <[email protected]>2018-03-21 11:54:28 +0100
commitcf3cbf0871832cb0808293842e5ae726edfc12e1 (patch)
treecd67d38d40c3414275ec257a6685b86c949c621a /erts/emulator/hipe/hipe_mode_switch.c
parent2c5711efcdd48ab8a9b7cd9ae27c97b9c1f8c37e (diff)
parent4bc282d812cc2c49aa3e2d073e96c720f16aa270 (diff)
downloadotp-cf3cbf0871832cb0808293842e5ae726edfc12e1.tar.gz
otp-cf3cbf0871832cb0808293842e5ae726edfc12e1.tar.bz2
otp-cf3cbf0871832cb0808293842e5ae726edfc12e1.zip
Merge pull request #1740 from rickard-green/rickard/signals/OTP-14589
Implementation of true asynchronous signaling between processes
Diffstat (limited to 'erts/emulator/hipe/hipe_mode_switch.c')
-rw-r--r--erts/emulator/hipe/hipe_mode_switch.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/hipe/hipe_mode_switch.c b/erts/emulator/hipe/hipe_mode_switch.c
index 8b497c9970..6af514d4ba 100644
--- a/erts/emulator/hipe/hipe_mode_switch.c
+++ b/erts/emulator/hipe/hipe_mode_switch.c
@@ -496,8 +496,10 @@ Process *hipe_mode_switch(Process *p, unsigned cmd, Eterm reg[])
erts_proc_lock(p, ERTS_PROC_LOCKS_MSG_RECEIVE);
p->i = hipe_beam_pc_resume;
p->arity = 0;
- erts_atomic32_read_band_relb(&p->state,
- ~ERTS_PSFLG_ACTIVE);
+ if (erts_atomic32_read_nob(&p->state) & ERTS_PSFLG_EXITING)
+ ASSERT(erts_atomic32_read_nob(&p->state) & ERTS_PSFLG_ACTIVE);
+ else
+ erts_atomic32_read_band_relb(&p->state, ~ERTS_PSFLG_ACTIVE);
erts_proc_unlock(p, ERTS_PROC_LOCKS_MSG_RECEIVE);
do_schedule:
{