X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FGC.c;h=10f6a3659932b769d46407a7994aaa8c565d983b;hp=727027dd930d2f937be8bad7e84d56816bb29883;hb=35a38acc6010d97b349092f9179c14d18f129e9b;hpb=5a2769f0273dd389977e8283375e7920d183bdd4 diff --git a/rts/GC.c b/rts/GC.c index 727027d..10f6a36 100644 --- a/rts/GC.c +++ b/rts/GC.c @@ -44,6 +44,7 @@ #endif #include "Trace.h" #include "RetainerProfile.h" +#include "RaiseAsync.h" #include @@ -2631,10 +2632,8 @@ scavengeTSO (StgTSO *tso) ) { tso->block_info.closure = evacuate(tso->block_info.closure); } - if ( tso->blocked_exceptions != NULL ) { - tso->blocked_exceptions = - (StgTSO *)evacuate((StgClosure *)tso->blocked_exceptions); - } + tso->blocked_exceptions = + (StgTSO *)evacuate((StgClosure *)tso->blocked_exceptions); // We don't always chase the link field: TSOs on the blackhole // queue are not automatically alive, so the link field is a @@ -4620,6 +4619,14 @@ threadPaused(Capability *cap, StgTSO *tso) nat weight_pending = 0; rtsBool prev_was_update_frame; + // Check to see whether we have threads waiting to raise + // exceptions, and we're not blocking exceptions, or are blocked + // interruptibly. This is important; if a thread is running with + // TSO_BLOCKEX and becomes blocked interruptibly, this is the only + // place we ensure that the blocked_exceptions get a chance. + maybePerformBlockedException (cap, tso); + if (tso->what_next == ThreadKilled) { return; } + stack_end = &tso->stack[tso->stack_size]; frame = (StgClosure *)tso->sp;