summaryrefslogtreecommitdiff
path: root/rts/StgStartup.cmm
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-04-16 14:19:02 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-04-16 14:19:02 +0000
commit94363dd5c2c443db08e5d3885b582247822c43b3 (patch)
tree603a5982f5ced31663c19ee2e0e4038d7fa33b66 /rts/StgStartup.cmm
parent5aa70fe578ca7841d06947a3e05dac33c11a918f (diff)
downloadhaskell-94363dd5c2c443db08e5d3885b582247822c43b3.tar.gz
MERGE: Fix a few uses of the wrong return convention for the scheduler
We changed the convention a while ago so that BaseReg is returned to the scheduler in R1, because BaseReg may change during the run of a thread, e.g. during a foreign call. A few places got missed, mostly for very rare events. Should fix concprog001, although I'm not able to reliably reproduce the failure.
Diffstat (limited to 'rts/StgStartup.cmm')
-rw-r--r--rts/StgStartup.cmm7
1 files changed, 7 insertions, 0 deletions
diff --git a/rts/StgStartup.cmm b/rts/StgStartup.cmm
index 33345cfcc5..2d83a676c0 100644
--- a/rts/StgStartup.cmm
+++ b/rts/StgStartup.cmm
@@ -128,6 +128,13 @@ stg_returnToSchedButFirst
jump R2;
}
+stg_threadFinished
+{
+ StgRegTable_rRet(BaseReg) = ThreadFinished;
+ R1 = BaseReg;
+ jump StgReturn;
+}
+
/* -----------------------------------------------------------------------------
Strict IO application - performing an IO action and entering its result.