diff options
author | Rikard Green <[email protected]> | 2018-05-18 11:22:33 +0200 |
---|---|---|
committer | Rikard Green <[email protected]> | 2018-05-18 11:22:33 +0200 |
commit | 2bc6ef5bb99ff1a7a4ac2a1370f0628acc730869 (patch) | |
tree | bc7816ec946c91d775666db0ce82addc67642344 /erts/emulator/beam/erl_process.c | |
parent | f8de655b70b91d72d90e39afae3d5cbe2678c75a (diff) | |
parent | 0985a72500ecd46579f6f7462ff121cc2c015f1f (diff) | |
download | otp-2bc6ef5bb99ff1a7a4ac2a1370f0628acc730869.tar.gz otp-2bc6ef5bb99ff1a7a4ac2a1370f0628acc730869.tar.bz2 otp-2bc6ef5bb99ff1a7a4ac2a1370f0628acc730869.zip |
Merge branch 'rickard/delete_process_schedule/OTP-15081'
* rickard/delete_process_schedule/OTP-15081:
Do not hold runq lock while deleting a process
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index b373d08a6b..58a5369515 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -9085,6 +9085,17 @@ scheduler_gc_proc(Process *c_p, int reds_left) return reds; } +static void +unlock_lock_rq(int pre_free, void *vrq) +{ + ErtsRunQueue *rq = vrq; + if (pre_free) + erts_runq_unlock(rq); + else + erts_runq_lock(rq); +} + + /* * schedule() is called from BEAM (process_main()) or HiPE * (hipe_mode_switch()) when the current process is to be @@ -9253,7 +9264,9 @@ Process *erts_schedule(ErtsSchedulerData *esdp, Process *p, int calls) } if (dec_refc) - erts_proc_dec_refc(p); + erts_proc_dec_refc_free_func(p, + unlock_lock_rq, + (void *) rq); } ASSERT(!esdp->free_process); |