diff options
author | Rickard Green <rickard@erlang.org> | 2010-12-17 11:35:06 +0100 |
---|---|---|
committer | Rickard Green <rickard@erlang.org> | 2010-12-17 11:35:06 +0100 |
commit | 264f3beaa4eec74244c6ed66d31e48ae5025df51 (patch) | |
tree | 14dff80ee6b65500a0dac42465026daff1cd215a /erts/emulator/beam/bif.c | |
parent | 99e34bba1a60b262e24496cc9288b549360c6377 (diff) | |
download | otp-264f3beaa4eec74244c6ed66d31e48ae5025df51.tar.gz otp-264f3beaa4eec74244c6ed66d31e48ae5025df51.tar.bz2 otp-264f3beaa4eec74244c6ed66d31e48ae5025df51.zip |
Decrement refc after unlock in exit/2
Diffstat (limited to 'erts/emulator/beam/bif.c')
-rw-r--r-- | erts/emulator/beam/bif.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c index 6e9755ad48..864e7c1178 100644 --- a/erts/emulator/beam/bif.c +++ b/erts/emulator/beam/bif.c @@ -1351,9 +1351,10 @@ BIF_RETTYPE exit_2(BIF_ALIST_2) #ifdef ERTS_SMP if (rp == BIF_P) rp_locks &= ~ERTS_PROC_LOCK_MAIN; - else + if (rp_locks) + erts_smp_proc_unlock(rp, rp_locks); + if (rp != BIF_P) erts_smp_proc_dec_refc(rp); - erts_smp_proc_unlock(rp, rp_locks); #endif /* * We may have exited ourselves and may have to take action. |