From: Bertram Felgenhauer Date: Wed, 7 Jan 2009 12:08:08 +0000 (+0000) Subject: Fix two more locking issues in throwTo() X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=6e102d0d3820d74d4f849b4c62c86e47b91963b1 Fix two more locking issues in throwTo() --- diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c index 10c9b7c..1a57e47 100644 --- a/rts/RaiseAsync.c +++ b/rts/RaiseAsync.c @@ -415,6 +415,7 @@ check_target: // Unblocking BlockedOnSTM threads requires the TSO to be // locked; see STM.c:unpark_tso(). if (target->why_blocked != BlockedOnSTM) { + unlockTSO(target); goto retry; } if ((target->flags & TSO_BLOCKEX) && @@ -436,6 +437,11 @@ check_target: // thread is blocking exceptions, and block on its // blocked_exception queue. lockTSO(target); + if (target->why_blocked != BlockedOnCCall && + target->why_blocked != BlockedOnCCall_NoUnblockExc) { + unlockTSO(target); + goto retry; + } blockedThrowTo(cap,source,target); *out = target; return THROWTO_BLOCKED;