summaryrefslogtreecommitdiff
path: root/rts/RaiseAsync.c
diff options
context:
space:
mode:
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;