diff options
author | Rickard Green <[email protected]> | 2010-12-17 12:49:14 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2010-12-17 12:49:14 +0100 |
commit | 962a313807f96f38f3bf40a5e8cd855ad09deccb (patch) | |
tree | 0b747d347295531b54e0d3e5e3a8fc1611197ba4 | |
parent | 1b5f4da2d59f3d42a5e7bb1f7aa1d65436bc2ef5 (diff) | |
parent | 264f3beaa4eec74244c6ed66d31e48ae5025df51 (diff) | |
download | otp-962a313807f96f38f3bf40a5e8cd855ad09deccb.tar.gz otp-962a313807f96f38f3bf40a5e8cd855ad09deccb.tar.bz2 otp-962a313807f96f38f3bf40a5e8cd855ad09deccb.zip |
Merge branch 'rickard/exit/2-refc/OTP-9005' into dev
* rickard/exit/2-refc/OTP-9005:
Decrement refc after unlock in exit/2
-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 d4a43f6e5f..bb237e378a 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. |