Skip to content

Commit

Permalink
Merge branch 'rickard/exit/2-refc/OTP-9005' into dev
Browse files Browse the repository at this point in the history
* rickard/exit/2-refc/OTP-9005:
  Decrement refc after unlock in exit/2
  • Loading branch information
rickard-green committed Dec 17, 2010
2 parents 1b5f4da + 264f3be commit 962a313
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions erts/emulator/beam/bif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 962a313

Please sign in to comment.