X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=rts%2FSchedule.c;h=05315a59d90db636e2a1c92fc38f584c24e90a31;hb=a916885ce70142ae5c05cc9e28230c308821e3d6;hp=07af0bf3eae3cb795b223b09dc10d5c8a7765127;hpb=90d1deddda8123c46c4d029439591075ff310fb4;p=ghc-hetmet.git diff --git a/rts/Schedule.c b/rts/Schedule.c index 07af0bf..05315a5 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -2667,10 +2667,9 @@ resurrectThreads (StgTSO *threads) switch (tso->why_blocked) { case BlockedOnMVar: - case BlockedOnException: /* Called by GC - sched_mutex lock is currently held. */ throwToSingleThreaded(cap, tso, - (StgClosure *)blockedOnDeadMVar_closure); + (StgClosure *)blockedIndefinitelyOnMVar_closure); break; case BlockedOnBlackHole: throwToSingleThreaded(cap, tso, @@ -2678,7 +2677,7 @@ resurrectThreads (StgTSO *threads) break; case BlockedOnSTM: throwToSingleThreaded(cap, tso, - (StgClosure *)blockedIndefinitely_closure); + (StgClosure *)blockedIndefinitelyOnSTM_closure); break; case NotBlocked: /* This might happen if the thread was blocked on a black hole @@ -2686,6 +2685,11 @@ resurrectThreads (StgTSO *threads) * can wake up threads, remember...). */ continue; + case BlockedOnException: + // throwTo should never block indefinitely: if the target + // thread dies or completes, throwTo returns. + barf("resurrectThreads: thread BlockedOnException"); + break; default: barf("resurrectThreads: thread blocked in a strange way"); }