diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-01-19 09:33:52 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-01-19 16:21:04 +0000 |
commit | d2dcac6a0291d5271bf7f8ff1394121abd6901d2 (patch) | |
tree | b9bbdb657a08c5b7b5ad9377e1c00e51c86d0f4a /rts | |
parent | 10300ecbab43e9f3411b6aa5fe02e713fb253d05 (diff) | |
download | haskell-d2dcac6a0291d5271bf7f8ff1394121abd6901d2.tar.gz |
Fix bug introduced in fac8ecbbafde17dd92439c41747223c43e9d2b80
Fixes recent failures in hGetBuf001.
Diffstat (limited to 'rts')
-rw-r--r-- | rts/posix/Select.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/rts/posix/Select.c b/rts/posix/Select.c index ffe72e8933..013b374d1a 100644 --- a/rts/posix/Select.c +++ b/rts/posix/Select.c @@ -182,18 +182,18 @@ awaitEvent(rtsBool wait) } } - if (wait) { - ptv = NULL; + if (!wait) { + // just poll + tv.tv_sec = 0; + tv.tv_usec = 0; + ptv = &tv; } else if (sleeping_queue != END_TSO_QUEUE) { Time min = LowResTimeToTime(sleeping_queue->block_info.target - now); tv.tv_sec = TimeToSeconds(min); tv.tv_usec = TimeToUS(min) % 1000000; ptv = &tv; } else { - // just poll - tv.tv_sec = 0; - tv.tv_usec = 0; - ptv = &tv; + ptv = NULL; } /* Check for any interesting events */ |