projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d779cca
)
wake up other Capabilities even when there is only one spark (see #2868)
author
Simon Marlow
<marlowsd@gmail.com>
Wed, 10 Dec 2008 16:46:44 +0000
(16:46 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Wed, 10 Dec 2008 16:46:44 +0000
(16:46 +0000)
rts/Schedule.c
patch
|
blob
|
history
diff --git
a/rts/Schedule.c
b/rts/Schedule.c
index
33715b1
..
38e3a3c
100644
(file)
--- a/
rts/Schedule.c
+++ b/
rts/Schedule.c
@@
-777,9
+777,11
@@
schedulePushWork(Capability *cap USED_IF_THREADS,
// Check whether we have more threads on our run queue, or sparks
// in our pool, that we could hand to another Capability.
// Check whether we have more threads on our run queue, or sparks
// in our pool, that we could hand to another Capability.
- if ((emptyRunQueue(cap) || cap->run_queue_hd->_link == END_TSO_QUEUE)
- && sparkPoolSizeCap(cap) < 2) {
- return;
+ if (cap->run_queue_hd == END_TSO_QUEUE) {
+ if (sparkPoolSizeCap(cap) < 2) return;
+ } else {
+ if (cap->run_queue_hd->_link == END_TSO_QUEUE &&
+ sparkPoolSizeCap(cap) < 1) return;
}
// First grab as many free Capabilities as we can.
}
// First grab as many free Capabilities as we can.