diff options
author | sof <unknown> | 2005-04-14 23:41:25 +0000 |
---|---|---|
committer | sof <unknown> | 2005-04-14 23:41:25 +0000 |
commit | e0bc615fbf7b7461c24b4da038b14e788a3bf6e4 (patch) | |
tree | 75361ad3dceb4f1dafb8503b8d74eaedccc3aaba | |
parent | d9bc4e4a3372c732c1c631d8dae7e5613d7464fe (diff) | |
download | haskell-e0bc615fbf7b7461c24b4da038b14e788a3bf6e4.tar.gz |
[project @ 2005-04-14 23:41:25 by sof]
Better reporting of WAIT_FAILEDs from WaitFor*Object() calls.
Merge to STABLE.
-rw-r--r-- | ghc/rts/win32/AsyncIO.c | 8 | ||||
-rw-r--r-- | ghc/rts/win32/Ticker.c | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/ghc/rts/win32/AsyncIO.c b/ghc/rts/win32/AsyncIO.c index 257a2becba..a0e03cb6c0 100644 --- a/ghc/rts/win32/AsyncIO.c +++ b/ghc/rts/win32/AsyncIO.c @@ -77,7 +77,7 @@ onIOComplete(unsigned int reqID, issued_reqs--; if (completed_hw == 1) { /* The event is used to wake up the scheduler thread should it - * be blocked waiting for requests to complete. It reset once + * be blocked waiting for requests to complete. The event resets once * that thread has cleared out the request queue/table. */ SetEvent(completed_req_event); @@ -204,6 +204,11 @@ start: case WAIT_OBJECT_0 + 1: case WAIT_TIMEOUT: return 0; + case WAIT_FAILED: { + DWORD dw = GetLastError(); + fprintf(stderr, "awaitRequests: wait failed -- error code: %lu\n", dw); fflush(stderr); + return 0; + } default: fprintf(stderr, "awaitRequests: unexpected wait return code %lu\n", dwRes); fflush(stderr); return 0; @@ -228,7 +233,6 @@ start: * */ unsigned int rID = completedTable[i].reqID; - prev = NULL; prev = NULL; for(tso = blocked_queue_hd ; tso != END_TSO_QUEUE; prev = tso, tso = tso->link) { diff --git a/ghc/rts/win32/Ticker.c b/ghc/rts/win32/Ticker.c index 124cbc8187..c1390b7d76 100644 --- a/ghc/rts/win32/Ticker.c +++ b/ghc/rts/win32/Ticker.c @@ -57,8 +57,13 @@ TimerProc(PVOID param) /* tick */ tickProc(0); break; + case WAIT_FAILED: { + DWORD dw = GetLastError(); + fprintf(stderr, "TimerProc: wait failed -- error code: %lu\n", dw); fflush(stderr); + break; + } default: - fprintf(stderr, "timer: unexpected result %lu\n", waitRes); fflush(stderr); + fprintf(stderr, "TimerProc: unexpected result %lu\n", waitRes); fflush(stderr); break; } } |