summaryrefslogtreecommitdiff
path: root/rts/RaiseAsync.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2010-05-05 09:45:06 +0000
committerSimon Marlow <marlowsd@gmail.com>2010-05-05 09:45:06 +0000
commit0a4162ac3cda41ef43b0e1ece4b6042327b8556c (patch)
tree2d87ba778b447ce0ed1b84fba37d92cd8d5c994d /rts/RaiseAsync.c
parent63dde2e3cb89839f7375363bde31fabdcddb1462 (diff)
downloadhaskell-0a4162ac3cda41ef43b0e1ece4b6042327b8556c.tar.gz
Don't raise a throwTo when the target is masking and BlockedOnBlackHole
Diffstat (limited to 'rts/RaiseAsync.c')
-rw-r--r--rts/RaiseAsync.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
index df7429a48a..d8ab08ab13 100644
--- a/rts/RaiseAsync.c
+++ b/rts/RaiseAsync.c
@@ -357,14 +357,20 @@ check_target:
case BlockedOnBlackHole:
{
- // Revoke the message by replacing it with IND. We're not
- // locking anything here, so we might still get a TRY_WAKEUP
- // message from the owner of the blackhole some time in the
- // future, but that doesn't matter.
- ASSERT(target->block_info.bh->header.info == &stg_MSG_BLACKHOLE_info);
- OVERWRITE_INFO(target->block_info.bh, &stg_IND_info);
- raiseAsync(cap, target, msg->exception, rtsFalse, NULL);
- return THROWTO_SUCCESS;
+ if (target->flags & TSO_BLOCKEX) {
+ // BlockedOnBlackHole is not interruptible.
+ blockedThrowTo(cap,target,msg);
+ return THROWTO_BLOCKED;
+ } else {
+ // Revoke the message by replacing it with IND. We're not
+ // locking anything here, so we might still get a TRY_WAKEUP
+ // message from the owner of the blackhole some time in the
+ // future, but that doesn't matter.
+ ASSERT(target->block_info.bh->header.info == &stg_MSG_BLACKHOLE_info);
+ OVERWRITE_INFO(target->block_info.bh, &stg_IND_info);
+ raiseAsync(cap, target, msg->exception, rtsFalse, NULL);
+ return THROWTO_SUCCESS;
+ }
}
case BlockedOnSTM: