summaryrefslogtreecommitdiff
path: root/includes
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 /includes
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 'includes')
-rw-r--r--includes/Cmm.h2
-rw-r--r--includes/StgMiscClosures.h1
-rw-r--r--includes/mkDerivedConstants.c1
3 files changed, 2 insertions, 2 deletions
diff --git a/includes/Cmm.h b/includes/Cmm.h
index 7a68a517fe..9915830451 100644
--- a/includes/Cmm.h
+++ b/includes/Cmm.h
@@ -25,7 +25,7 @@
* - Hp += n ==> Hp_adj(n)
* - R1.i ==> R1 (similarly for R1.w, R1.cl etc.)
* - You need to explicitly dereference variables; eg.
- * context_switch ==> CInt[context_switch]
+ * alloc_blocks ==> CInt[alloc_blocks]
* - convert all word offsets into byte offsets:
* - e ==> WDS(e)
* - sizeofW(StgFoo) ==> SIZEOF_StgFoo
diff --git a/includes/StgMiscClosures.h b/includes/StgMiscClosures.h
index 61518e8dec..16cd476172 100644
--- a/includes/StgMiscClosures.h
+++ b/includes/StgMiscClosures.h
@@ -619,7 +619,6 @@ extern StgWord rts_stop_on_exception[];
extern StgWord rts_breakpoint_io_action[];
// Schedule.c
-extern int RTS_VAR(context_switch);
extern StgWord RTS_VAR(blocked_queue_hd), RTS_VAR(blocked_queue_tl);
extern StgWord RTS_VAR(sleeping_queue);
extern StgWord RTS_VAR(blackhole_queue);
diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c
index 51e52f0089..aaa4531ea0 100644
--- a/includes/mkDerivedConstants.c
+++ b/includes/mkDerivedConstants.c
@@ -232,6 +232,7 @@ main(int argc, char *argv[])
field_offset(Capability, r);
field_offset(Capability, lock);
struct_field(Capability, mut_lists);
+ struct_field(Capability, context_switch);
struct_field(bdescr, start);
struct_field(bdescr, free);