Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/d2dcac6a0291d5271bf7f8ff1394121abd6901d2

>---------------------------------------------------------------

commit d2dcac6a0291d5271bf7f8ff1394121abd6901d2
Author: Simon Marlow <[email protected]>
Date:   Thu Jan 19 09:33:52 2012 +0000

    Fix bug introduced in fac8ecbbafde17dd92439c41747223c43e9d2b80
    
    Fixes recent failures in hGetBuf001.

>---------------------------------------------------------------

 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 ffe72e8..013b374 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 */



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to