X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FThreads.c;h=05a13c7f3b262f07b04cc68d7a8118f0604f9974;hp=0c3e5916659468ba64424e080248e7bb348b49f0;hb=848797ebb9b60cf9c8a004c97afd008f5325c75f;hpb=1373cd3085b8dec456e6118c58e940718cb9d559 diff --git a/rts/Threads.c b/rts/Threads.c index 0c3e591..05a13c7 100644 --- a/rts/Threads.c +++ b/rts/Threads.c @@ -290,12 +290,31 @@ tryWakeupThread (Capability *cap, StgTSO *tso) SET_HDR(msg, &stg_MSG_TRY_WAKEUP_info, CCS_SYSTEM); msg->tso = tso; sendMessage(cap, tso->cap, (Message*)msg); + debugTraceCap(DEBUG_sched, cap, "message: try wakeup thread %ld on cap %d", + (lnat)tso->id, tso->cap->no); return; } #endif switch (tso->why_blocked) { + case BlockedOnMsgThrowTo: + { + const StgInfoTable *i; + + i = lockClosure(tso->block_info.closure); + unlockClosure(tso->block_info.closure, i); + if (i != &stg_MSG_NULL_info) { + debugTraceCap(DEBUG_sched, cap, "thread %ld still blocked on throwto (%p)", + (lnat)tso->id, tso->block_info.throwto->header.info); + break; // still blocked + } + + // remove the block frame from the stack + ASSERT(tso->sp[0] == (StgWord)&stg_block_throwto_info); + tso->sp += 3; + // fall through... + } case BlockedOnBlackHole: case BlockedOnSTM: {