summaryrefslogtreecommitdiff
path: root/rts/Interpreter.c
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/Interpreter.c
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/Interpreter.c')
-rw-r--r--rts/Interpreter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Interpreter.c b/rts/Interpreter.c
index d541dfc409..4324f7f44a 100644
--- a/rts/Interpreter.c
+++ b/rts/Interpreter.c
@@ -1281,7 +1281,7 @@ run_BCO:
// context switching: sometimes the scheduler can invoke
// the interpreter with context_switch == 1, particularly
// if the -C0 flag has been given on the cmd line.
- if (context_switch) {
+ if (cap->context_switch) {
Sp--; Sp[0] = (W_)&stg_enter_info;
RETURN_TO_SCHEDULER(ThreadInterpret, ThreadYielding);
}