[commit: ghc] ghc-7.4: Fix bug introduced in fac8ecbbafde17dd92439c41747223c43e9d2b80 (7a5f804)

Ian Lynagh igloo at earth.li
Wed Jan 25 17:51:10 CET 2012


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

On branch  : ghc-7.4

http://hackage.haskell.org/trac/ghc/changeset/7a5f8048fb4a9d620724a47d92762102089a6c9a

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

commit 7a5f8048fb4a9d620724a47d92762102089a6c9a
Author: Simon Marlow <marlowsd at gmail.com>
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 */





More information about the Cvs-ghc mailing list