summaryrefslogtreecommitdiff
path: root/rts/RaiseAsync.c
diff options
context:
space:
mode:
authorBertram Felgenhauer <int-e@gmx.de>2009-01-07 12:08:08 +0000
committerBertram Felgenhauer <int-e@gmx.de>2009-01-07 12:08:08 +0000
commit6e102d0d3820d74d4f849b4c62c86e47b91963b1 (patch)
tree71dd9625655c5385e9d7500e2f71026086db3f56 /rts/RaiseAsync.c
parentfef4deb4d99cf3351f4e1a199267ed0860352f75 (diff)
downloadhaskell-6e102d0d3820d74d4f849b4c62c86e47b91963b1.tar.gz
Fix two more locking issues in throwTo()
Diffstat (limited to 'rts/RaiseAsync.c')
-rw-r--r--rts/RaiseAsync.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
index 10c9b7c3c1..1a57e47466 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;