X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRaiseAsync.c;h=d8ab08ab131bc09681675abf4de31d482ab92b74;hb=e499cbe9455b359e0325327fcdb57e2c9d621a0e;hp=bebbcd47228d2443ce236797156861f9ef98d5c8;hpb=f4692220c7cbdadaa633f50eb2b30b59edb30183;p=ghc-hetmet.git diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c index bebbcd4..d8ab08a 100644 --- a/rts/RaiseAsync.c +++ b/rts/RaiseAsync.c @@ -271,7 +271,7 @@ check_target: // might as well just do it now. The message will // be a no-op when it arrives. unlockClosure((StgClosure*)m, i); - tryWakeupThread(cap, target); + tryWakeupThread_(cap, target); goto retry; } @@ -337,7 +337,7 @@ check_target: // thread now anyway and ignore the message when it // arrives. unlockClosure((StgClosure *)mvar, info); - tryWakeupThread(cap, target); + tryWakeupThread_(cap, target); goto retry; } @@ -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: