X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRaiseAsync.c;h=d892e9563866a39e3f13fcd40e0274b87876735f;hb=e576ba5d31fbae54c43e88316fb0dbdba9cbd4ff;hp=4a405e7b4909f23511e822873c50e3184670fe26;hpb=ab0e778ccfde61aed4c22679b24d175fc6cc9bf3;p=ghc-hetmet.git diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c index 4a405e7..d892e95 100644 --- a/rts/RaiseAsync.c +++ b/rts/RaiseAsync.c @@ -12,7 +12,6 @@ #include "Trace.h" #include "RaiseAsync.h" #include "SMP.h" -#include "Storage.h" #include "Schedule.h" #include "LdvProfile.h" #include "Updates.h" @@ -497,9 +496,11 @@ throwToReleaseTarget (void *tso) queue, but not perform any throwTo() immediately. This might be more appropriate when the target thread is the one actually running (see Exception.cmm). + + Returns: non-zero if an exception was raised, zero otherwise. -------------------------------------------------------------------------- */ -void +int maybePerformBlockedException (Capability *cap, StgTSO *tso) { StgTSO *source; @@ -515,7 +516,7 @@ maybePerformBlockedException (Capability *cap, StgTSO *tso) // locked it. if (tso->blocked_exceptions == END_TSO_QUEUE) { unlockTSO(tso); - return; + return 0; } // We unblock just the first thread on the queue, and perform @@ -525,7 +526,9 @@ maybePerformBlockedException (Capability *cap, StgTSO *tso) tso->blocked_exceptions = unblockOne_(cap, source, rtsFalse/*no migrate*/); unlockTSO(tso); + return 1; } + return 0; } void