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:
abb7803
)
cope with ThreadRelocated on the sleeping_queue
author
Simon Marlow
<marlowsd@gmail.com>
Tue, 17 Feb 2009 13:27:57 +0000
(13:27 +0000)
committer
Simon Marlow
<marlowsd@gmail.com>
Tue, 17 Feb 2009 13:27:57 +0000
(13:27 +0000)
rts/posix/Select.c
patch
|
blob
|
history
diff --git
a/rts/posix/Select.c
b/rts/posix/Select.c
index
bf4b7ae
..
32dca96
100644
(file)
--- a/
rts/posix/Select.c
+++ b/
rts/posix/Select.c
@@
-60,9
+60,15
@@
wakeUpSleepingThreads(lnat ticks)
StgTSO *tso;
rtsBool flag = rtsFalse;
StgTSO *tso;
rtsBool flag = rtsFalse;
- while (sleeping_queue != END_TSO_QUEUE &&
- (int)(ticks - sleeping_queue->block_info.target) >= 0) {
+ while (sleeping_queue != END_TSO_QUEUE) {
tso = sleeping_queue;
tso = sleeping_queue;
+ if (tso->what_next == ThreadRelocated) {
+ sleeping_queue = tso->_link;
+ continue;
+ }
+ if (((long)ticks - (long)tso->block_info.target) < 0) {
+ break;
+ }
sleeping_queue = tso->_link;
tso->why_blocked = NotBlocked;
tso->_link = END_TSO_QUEUE;
sleeping_queue = tso->_link;
tso->why_blocked = NotBlocked;
tso->_link = END_TSO_QUEUE;