X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRaiseAsync.c;h=d892e9563866a39e3f13fcd40e0274b87876735f;hb=ca5ded310c0a596be199a3da5f14be2fb2020687;hp=0f84ae536058049683b9c3cbc5702bb77dc7d3a5;hpb=9cef40bd4dd2536c7a370a1a9b78461c152805cc;p=ghc-hetmet.git diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c index 0f84ae5..d892e95 100644 --- a/rts/RaiseAsync.c +++ b/rts/RaiseAsync.c @@ -13,7 +13,6 @@ #include "RaiseAsync.h" #include "SMP.h" #include "Schedule.h" -#include "Storage.h" #include "LdvProfile.h" #include "Updates.h" #include "STM.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