From b877faddc0cce7cceb470861a084784e0c1073b0 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Thu, 6 Nov 2008 11:40:45 +0000 Subject: Cope with ThreadRelocated when traversing the blocked_queue Fixes "invalid what_next field" in ioref001 on Windows, and perhaps others --- rts/posix/Select.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rts/posix') 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); -- cgit v1.2.1