aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2019-03-21 16:27:41 +0100
committerRickard Green <[email protected]>2019-03-21 16:27:41 +0100
commit984ccc38e160963bfd1a70f408365cba45245cad (patch)
treec03f05356c3baa9e2ce00770cf7313e45a1ca3f4 /erts/emulator/beam
parent460a958e60f8c2266bb78be1aab2a9c0f64cbb28 (diff)
parent938cd607f31559d5497b620b0c5ed8b92972bb27 (diff)
downloadotp-984ccc38e160963bfd1a70f408365cba45245cad.tar.gz
otp-984ccc38e160963bfd1a70f408365cba45245cad.tar.bz2
otp-984ccc38e160963bfd1a70f408365cba45245cad.zip
Merge branch 'rickard/dirty-resume/OTP-15688' into maint
* rickard/dirty-resume/OTP-15688: Fix reception of resume signal on process executing dirty
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_proc_sig_queue.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_proc_sig_queue.c b/erts/emulator/beam/erl_proc_sig_queue.c
index 18418a76e1..c95b7057fd 100644
--- a/erts/emulator/beam/erl_proc_sig_queue.c
+++ b/erts/emulator/beam/erl_proc_sig_queue.c
@@ -3247,9 +3247,15 @@ erts_proc_sig_handle_incoming(Process *c_p, erts_aint32_t *statep,
erts_nif_demonitored((ErtsResource *) tmon->other.ptr);
cnt++;
break;
- case ERTS_MON_TYPE_SUSPEND:
- erts_resume(c_p, ERTS_PROC_LOCK_MAIN);
+ case ERTS_MON_TYPE_SUSPEND: {
+ ErtsMonitorSuspend *msp;
+ erts_aint_t mstate;
+ msp = (ErtsMonitorSuspend *) erts_monitor_to_data(tmon);
+ mstate = erts_atomic_read_acqb(&msp->state);
+ if (mstate & ERTS_MSUSPEND_STATE_FLG_ACTIVE)
+ erts_resume(c_p, ERTS_PROC_LOCK_MAIN);
break;
+ }
default:
break;
}