summaryrefslogtreecommitdiff
path: root/rts/posix
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-11-06 11:40:45 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-11-06 11:40:45 +0000
commitb877faddc0cce7cceb470861a084784e0c1073b0 (patch)
tree211eab224edf24410855ecb570c4015f4210557e /rts/posix
parent9fa1c9f1f97d3f270fec864e272be18ef6a46a10 (diff)
downloadhaskell-b877faddc0cce7cceb470861a084784e0c1073b0.tar.gz
Cope with ThreadRelocated when traversing the blocked_queue
Fixes "invalid what_next field" in ioref001 on Windows, and perhaps others
Diffstat (limited to 'rts/posix')
-rw-r--r--rts/posix/Select.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/posix/Select.c b/rts/posix/Select.c
index ae9c717a9a..bf4b7ae615 100644
--- a/rts/posix/Select.c
+++ b/rts/posix/Select.c
@@ -244,6 +244,11 @@ awaitEvent(rtsBool wait)
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);