projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48fb2b5
)
wakeUpSleepingThreads: fix off by one
author
Simon Marlow
<simonmar@microsoft.com>
Wed, 18 Jul 2007 09:27:54 +0000
(09:27 +0000)
committer
Simon Marlow
<simonmar@microsoft.com>
Wed, 18 Jul 2007 09:27:54 +0000
(09:27 +0000)
The symptom of this bug is after the time of a threadDelay has
expired, the RTS does a whole slew of extra select() calls.
This should help with #1523, but it's not the whole story.
rts/posix/Select.c
patch
|
blob
|
history
diff --git
a/rts/posix/Select.c
b/rts/posix/Select.c
index
57599bc
..
fb7f38d
100644
(file)
--- a/
rts/posix/Select.c
+++ b/
rts/posix/Select.c
@@
-61,7
+61,7
@@
wakeUpSleepingThreads(lnat ticks)
rtsBool flag = rtsFalse;
while (sleeping_queue != END_TSO_QUEUE &&
- (int)(ticks - sleeping_queue->block_info.target) > 0) {
+ (int)(ticks - sleeping_queue->block_info.target) >= 0) {
tso = sleeping_queue;
sleeping_queue = tso->link;
tso->why_blocked = NotBlocked;