projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add ASSERTs to all calls of nameModule
[ghc-hetmet.git]
/
rts
/
Capability.h
diff --git
a/rts/Capability.h
b/rts/Capability.h
index
94306eb
..
70d9ee9
100644
(file)
--- a/
rts/Capability.h
+++ b/
rts/Capability.h
@@
-66,6
+66,10
@@
struct Capability_ {
// each GC.
bdescr **mut_lists;
// each GC.
bdescr **mut_lists;
+ // Context switch flag. We used to have one global flag, now one
+ // per capability. Locks required : none (conflicts are harmless)
+ int context_switch;
+
#if defined(THREADED_RTS)
// Worker Tasks waiting in the wings. Singly-linked.
Task *spare_workers;
#if defined(THREADED_RTS)
// Worker Tasks waiting in the wings. Singly-linked.
Task *spare_workers;
@@
-232,6
+236,9
@@
extern void grabCapability (Capability **pCap);
#endif /* !THREADED_RTS */
#endif /* !THREADED_RTS */
+// cause all capabilities to context switch as soon as possible.
+void setContextSwitches(void);
+
// Free a capability on exit
void freeCapability (Capability *cap);
// Free a capability on exit
void freeCapability (Capability *cap);