summaryrefslogtreecommitdiff
path: root/rts/PrimOps.cmm
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-09-19 10:26:01 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-09-19 10:26:01 +0000
commit8f52645bd99ee3e636a34826c0cbfc5939920da1 (patch)
treea1664a93c679eed383facbbcba26334ddfe398c4 /rts/PrimOps.cmm
parent09bb1eb4d782fd67c36145fd230bcb201d1548ba (diff)
downloadhaskell-8f52645bd99ee3e636a34826c0cbfc5939920da1.tar.gz
Move the context_switch flag into the Capability
Fixes a long-standing bug that could in some cases cause sub-optimal scheduling behaviour.
Diffstat (limited to 'rts/PrimOps.cmm')
-rw-r--r--rts/PrimOps.cmm4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index f2ce41551a..e754eb05bd 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -970,7 +970,7 @@ forkzh_fast
foreign "C" scheduleThread(MyCapability() "ptr", threadid "ptr") [];
// switch at the earliest opportunity
- CInt[context_switch] = 1 :: CInt;
+ Capability_context_switch(MyCapability()) = 1 :: CInt;
RET_P(threadid);
}
@@ -999,7 +999,7 @@ forkOnzh_fast
foreign "C" scheduleThreadOn(MyCapability() "ptr", cpu, threadid "ptr") [];
// switch at the earliest opportunity
- CInt[context_switch] = 1 :: CInt;
+ Capability_context_switch(MyCapability()) = 1 :: CInt;
RET_P(threadid);
}