diff options
author | Lukas Larsson <[email protected]> | 2018-12-17 10:59:50 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2019-02-21 16:37:59 +0100 |
commit | 45c57256d06b14bae7a4f19978a375e360b609cf (patch) | |
tree | c6b7ea9b6519038bb7002dba02a7cb377b45575b /erts/emulator/beam/beam_emu.c | |
parent | 5c8f2bee9a427768c187a35a6ecd720faa860200 (diff) | |
download | otp-45c57256d06b14bae7a4f19978a375e360b609cf.tar.gz otp-45c57256d06b14bae7a4f19978a375e360b609cf.tar.bz2 otp-45c57256d06b14bae7a4f19978a375e360b609cf.zip |
erts: Yield later during process exit and allow free procs to run
OTP-15610
Diffstat (limited to 'erts/emulator/beam/beam_emu.c')
-rw-r--r-- | erts/emulator/beam/beam_emu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index 4ef06464f4..90162a6543 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -885,19 +885,22 @@ void process_main(Eterm * x_reg_array, FloatDef* f_reg_array) #include "beam_warm.h" OpCase(normal_exit): { - SWAPOUT; + HEAVY_SWAPOUT; c_p->freason = EXC_NORMAL; c_p->arity = 0; /* In case this process will ever be garbed again. */ ERTS_UNREQ_PROC_MAIN_LOCK(c_p); erts_do_exit_process(c_p, am_normal); ERTS_REQ_PROC_MAIN_LOCK(c_p); + HEAVY_SWAPIN; goto do_schedule; } OpCase(continue_exit): { + HEAVY_SWAPOUT; ERTS_UNREQ_PROC_MAIN_LOCK(c_p); erts_continue_exit_process(c_p); ERTS_REQ_PROC_MAIN_LOCK(c_p); + HEAVY_SWAPIN; goto do_schedule; } |