[project @ 2004-07-15 20:50:40 by sof]
authorsof <unknown>
Thu, 15 Jul 2004 20:50:40 +0000 (20:50 +0000)
committersof <unknown>
Thu, 15 Jul 2004 20:50:40 +0000 (20:50 +0000)
oops, back out rev. 1.31

ghc/rts/Select.c

index 30e715e..223bdd6 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Select.c,v 1.31 2004/07/15 20:42:45 sof Exp $
+ * $Id: Select.c,v 1.32 2004/07/15 20:50:40 sof Exp $
  *
  * (c) The GHC Team 1995-2002
  *
 #include <unistd.h>
 #endif
 
-#ifdef INTEGRITY
-#include <sys/socket.h>
-#endif
-
 /* last timestamp */
 nat timestamp = 0;
 
@@ -170,19 +166,7 @@ awaitEvent(rtsBool wait)
 
 #ifdef RTS_SUPPORTS_THREADS
       if(!workerWakeupInited) {
-#if defined(INTEGRITY)
-       int arg;
-       int rc = socketpair(AF_LOCAL, SOCK_STREAM, 0, workerWakeupPipe);
-       if (rc == -1) {
-         printf("failed to create socketpair: %d\n", errno);
-       }
-       arg = fcntl(workerWakeupPipe[0], F_GETFL,0);
-       fcntl(workerWakeupPipe[0], F_SETFL, arg | O_NONBLOCK);
-       arg = fcntl(workerWakeupPipe[1], F_GETFL,0);
-       fcntl(workerWakeupPipe[1], F_SETFL, arg | O_NONBLOCK);
-#else
           pipe(workerWakeupPipe);
-#endif
           workerWakeupInited = rtsTrue;
       }
       FD_SET(workerWakeupPipe[0], &rfd);
@@ -361,9 +345,10 @@ wakeBlockedWorkerThread()
 {
     if(isWorkerBlockedInAwaitEvent && !workerWakeupPending) {
        unsigned char dummy = 42;       // Any value will do here
-       // write something so that select() wakes up
-       workerWakeupPending = rtsTrue;
+       
+                       // write something so that select() wakes up
        write(workerWakeupPipe[1],&dummy,1);
+       workerWakeupPending = rtsTrue;
     }
 }