summaryrefslogtreecommitdiff
path: root/ghc/rts/win32
diff options
context:
space:
mode:
authorsof <unknown>2003-07-12 00:10:31 +0000
committersof <unknown>2003-07-12 00:10:31 +0000
commit582e032f94e4ab3cddade29d2d7907833c54e46e (patch)
tree6e1b0e46e1e72bb79244315b912653a4fc074658 /ghc/rts/win32
parent21443993d5b042f97927ab92b6b38a6ff365ed1e (diff)
downloadhaskell-582e032f94e4ab3cddade29d2d7907833c54e46e.tar.gz
[project @ 2003-07-12 00:10:31 by sof]
awaitRequests(): BlockedOnDelay threads not expected on blocked_queue
Diffstat (limited to 'ghc/rts/win32')
-rw-r--r--ghc/rts/win32/AsyncIO.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/ghc/rts/win32/AsyncIO.c b/ghc/rts/win32/AsyncIO.c
index 7efaf14e89..00866963e1 100644
--- a/ghc/rts/win32/AsyncIO.c
+++ b/ghc/rts/win32/AsyncIO.c
@@ -5,6 +5,7 @@
* (c) sof, 2002-2003.
*/
#include "Rts.h"
+#include "RtsUtils.h"
#include <windows.h>
#include <stdio.h>
#include "Schedule.h"
@@ -195,7 +196,6 @@ start:
prev = NULL;
for(tso = blocked_queue_hd ; tso != END_TSO_QUEUE; tso = tso->link) {
switch(tso->why_blocked) {
- case BlockedOnDelay:
case BlockedOnRead:
case BlockedOnWrite:
case BlockedOnDoProc:
@@ -203,11 +203,9 @@ start:
/* Found the thread blocked waiting on request; stodgily fill
* in its result block.
*/
- if (tso->why_blocked != BlockedOnDelay) {
- tso->block_info.async_result->len = completedTable[i].len;
- tso->block_info.async_result->errCode = completedTable[i].errCode;
- }
-
+ tso->block_info.async_result->len = completedTable[i].len;
+ tso->block_info.async_result->errCode = completedTable[i].errCode;
+
/* Drop the matched TSO from blocked_queue */
if (prev) {
prev->link = tso->link;
@@ -225,6 +223,9 @@ start:
}
break;
default:
+ if (tso->why_blocked != NotBlocked) {
+ barf("awaitRequests: odd thread state");
+ }
break;
}
prev = tso;