projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
extend the rules/c-objs macro to take the way as a parameter
[ghc-hetmet.git]
/
rts
/
posix
/
Select.c
diff --git
a/rts/posix/Select.c
b/rts/posix/Select.c
index
ae9c717
..
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;
@@
-244,6
+250,11
@@
awaitEvent(rtsBool wait)
if (select_succeeded || unblock_all) {
for(tso = blocked_queue_hd; tso != END_TSO_QUEUE; tso = next) {
next = tso->_link;
if (select_succeeded || unblock_all) {
for(tso = blocked_queue_hd; tso != END_TSO_QUEUE; tso = next) {
next = tso->_link;
+
+ if (tso->what_next == ThreadRelocated) {
+ continue;
+ }
+
switch (tso->why_blocked) {
case BlockedOnRead:
ready = unblock_all || FD_ISSET(tso->block_info.fd, &rfd);
switch (tso->why_blocked) {
case BlockedOnRead:
ready = unblock_all || FD_ISSET(tso->block_info.fd, &rfd);