aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_emu.c
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2016-08-11 16:23:44 +0200
committerErlang/OTP <[email protected]>2016-08-11 16:23:44 +0200
commit4e9c137e708178319d63a143e802fdbd2e628651 (patch)
tree53161c8b94e11868f1ecd4095ed479bdea35aeb2 /erts/emulator/beam/beam_emu.c
parent020d38d4c9062f255b52eeb35542152c7cff1598 (diff)
parent17c838402c6d71aef041548ad36ee66db6f24a56 (diff)
downloadotp-4e9c137e708178319d63a143e802fdbd2e628651.tar.gz
otp-4e9c137e708178319d63a143e802fdbd2e628651.tar.bz2
otp-4e9c137e708178319d63a143e802fdbd2e628651.zip
Merge branch 'rickard/proc-tmo-bug/OTP-13798' into maint-19
* rickard/proc-tmo-bug/OTP-13798: Fix race causing lost wakeup on receive-after timeout
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r--erts/emulator/beam/beam_emu.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index c6258287c4..03aec2c987 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -2161,7 +2161,10 @@ void process_main(void)
c_p->i = (BeamInstr *) Arg(0); /* L1 */
SWAPOUT;
c_p->arity = 0;
- erts_smp_atomic32_read_band_relb(&c_p->state, ~ERTS_PSFLG_ACTIVE);
+
+ if (!ERTS_PTMR_IS_TIMED_OUT(c_p))
+ erts_smp_atomic32_read_band_relb(&c_p->state,
+ ~ERTS_PSFLG_ACTIVE);
ASSERT(!ERTS_PROC_IS_EXITING(c_p));
erts_smp_proc_unlock(c_p, ERTS_PROC_LOCKS_MSG_RECEIVE);
c_p->current = NULL;