summaryrefslogtreecommitdiff
path: root/rts/RaiseAsync.c
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-09-03 16:58:47 +0000
committerIan Lynagh <igloo@earth.li>2007-09-03 16:58:47 +0000
commit45202530612593a0ba7a6c559a38dc1ff26670a4 (patch)
tree228fa373ca3caae3b30b841bc88fbc610badb4bf /rts/RaiseAsync.c
parentf71b024714320a3f1606b3fda36610ac3f043774 (diff)
downloadhaskell-45202530612593a0ba7a6c559a38dc1ff26670a4.tar.gz
Fix building RTS with gcc 2.*; declare all variables at the top of a block
Patch from Audrey Tang.
Diffstat (limited to 'rts/RaiseAsync.c')
-rw-r--r--rts/RaiseAsync.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
index d892e95638..b71e126f04 100644
--- a/rts/RaiseAsync.c
+++ b/rts/RaiseAsync.c
@@ -942,10 +942,12 @@ raiseAsync(Capability *cap, StgTSO *tso, StgClosure *exception,
}
case STOP_FRAME:
+ {
// We've stripped the entire stack, the thread is now dead.
tso->what_next = ThreadKilled;
tso->sp = frame + sizeofW(StgStopFrame);
return;
+ }
case CATCH_FRAME:
// If we find a CATCH_FRAME, and we've got an exception to raise,
@@ -1017,15 +1019,17 @@ raiseAsync(Capability *cap, StgTSO *tso, StgClosure *exception,
// whether the transaction is valid or not because its
// possible validity cannot have caused the exception
// and will not be visible after the abort.
- debugTrace(DEBUG_stm,
- "found atomically block delivering async exception");
+ {
StgTRecHeader *trec = tso -> trec;
StgTRecHeader *outer = stmGetEnclosingTRec(trec);
+ debugTrace(DEBUG_stm,
+ "found atomically block delivering async exception");
stmAbortTransaction(cap, trec);
stmFreeAbortedTRec(cap, trec);
tso -> trec = outer;
break;
+ };
default:
break;