summaryrefslogtreecommitdiff
path: root/rts/HeapStackCheck.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/HeapStackCheck.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/HeapStackCheck.cmm')
-rw-r--r--rts/HeapStackCheck.cmm2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/HeapStackCheck.cmm b/rts/HeapStackCheck.cmm
index 333d0c09e0..3980ca2dd1 100644
--- a/rts/HeapStackCheck.cmm
+++ b/rts/HeapStackCheck.cmm
@@ -66,7 +66,7 @@ import LeaveCriticalSection;
CLOSE_NURSERY(); \
CurrentNursery = bdescr_link(CurrentNursery); \
OPEN_NURSERY(); \
- if (CInt[context_switch] != 0 :: CInt) { \
+ if (Capability_context_switch(MyCapability()) != 0 :: CInt) { \
R1 = ThreadYielding; \
goto sched; \
} else { \