diff options
author | Erlang/OTP <[email protected]> | 2019-03-21 16:46:45 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2019-03-21 16:46:45 +0100 |
commit | f4c6d5e9f0d8b3d089e6d468ce898470779f38fb (patch) | |
tree | 6dbd1b70ce058f1110ed4160e16446d40711d506 /erts | |
parent | 265da2173f9e0037eb7ba56fc311dfefce4dfd05 (diff) | |
parent | 8368589a9b69b0c8f9d0e9a9c94f51f7afecafa8 (diff) | |
download | otp-f4c6d5e9f0d8b3d089e6d468ce898470779f38fb.tar.gz otp-f4c6d5e9f0d8b3d089e6d468ce898470779f38fb.tar.bz2 otp-f4c6d5e9f0d8b3d089e6d468ce898470779f38fb.zip |
Merge branch 'max-au/erts/dirty_scheduler_shutdown/PR-2172/OTP-15690' into maint-21
* max-au/erts/dirty_scheduler_shutdown/PR-2172/OTP-15690:
erts: release dirty runqueue lock before entering endless loop when BEAM is shutting down
# Conflicts:
# erts/emulator/beam/erl_process.c
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index cc02fbad1e..1f464e2e5a 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -9474,6 +9474,7 @@ Process *erts_schedule(ErtsSchedulerData *esdp, Process *p, int calls) if (!is_normal_sched & !!(flags & ERTS_RUNQ_FLG_HALTING)) { /* Wait for emulator to terminate... */ + erts_runq_unlock(rq); while (1) erts_milli_sleep(1000*1000); } @@ -13081,10 +13082,10 @@ void erts_halt(int code) if (-1 == erts_atomic32_cmpxchg_acqb(&erts_halt_progress, erts_no_schedulers, -1)) { + notify_reap_ports_relb(); ERTS_RUNQ_FLGS_SET(ERTS_DIRTY_CPU_RUNQ, ERTS_RUNQ_FLG_HALTING); ERTS_RUNQ_FLGS_SET(ERTS_DIRTY_IO_RUNQ, ERTS_RUNQ_FLG_HALTING); erts_halt_code = code; - notify_reap_ports_relb(); } } |