summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-05-17 02:01:42 +0100
committerIan Lynagh <igloo@earth.li>2012-05-17 02:01:42 +0100
commitb002f1b084a485f99e6c43f20f8060914e18d54d (patch)
treeaaaf11e2e1639028841c57a957b52a6222d6c324 /rts
parent5e4bab8c684ea961f08dc9c4f1799991645c32b1 (diff)
parent66839957a376dbe85608822c1820eb6c99210883 (diff)
downloadhaskell-b002f1b084a485f99e6c43f20f8060914e18d54d.tar.gz
Merge branch 'master' of http://darcs.haskell.org//ghc
Diffstat (limited to 'rts')
-rw-r--r--rts/PrimOps.cmm5
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index 93ef23a71e..2ab26f7ba4 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -665,6 +665,11 @@ stg_forkOnzh
stg_yieldzh
{
+ // when we yield to the scheduler, we have to tell it to put the
+ // current thread to the back of the queue by setting the
+ // context_switch flag. If we don't do this, it will run the same
+ // thread again.
+ Capability_context_switch(MyCapability()) = 1 :: CInt;
jump stg_yield_noregs;
}