[project @ 2005-10-26 14:53:30 by simonpj]
authorsimonpj <unknown>
Wed, 26 Oct 2005 14:53:30 +0000 (14:53 +0000)
committersimonpj <unknown>
Wed, 26 Oct 2005 14:53:30 +0000 (14:53 +0000)
awaitRequests: blocked_queue_tl was being set to NULL rather than
END_TSO_QUEUE if the thread being removed was at the end of the queue.

This bug has been in the code since 2003 - I have absolutely no idea
why it hasn't manifested until today.

ghc/rts/win32/AsyncIO.c

index 6881275..b8cbf28 100644 (file)
@@ -280,7 +280,7 @@ start:
                            blocked_queue_hd = tso->link;
                        }
                        if (blocked_queue_tl == tso) {
-                           blocked_queue_tl = prev;
+                           blocked_queue_tl = prev ? prev : END_TSO_QUEUE;
                        }
                    
                        /* Terminates the run queue + this inner for-loop. */