The rest of the #1185 patch (forkProcess and -threaded)
authorSimon Marlow <marlowsd@gmail.com>
Fri, 13 Nov 2009 10:45:18 +0000 (10:45 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Fri, 13 Nov 2009 10:45:18 +0000 (10:45 +0000)
Due to darcs confusion, I managed to leave out part of the patch for
#1185.  This should make 1185(threaded1) go through now.

rts/Schedule.c
rts/posix/Signals.c
rts/posix/Signals.h

index 539e006..998d846 100644 (file)
@@ -1683,6 +1683,10 @@ forkProcess(HsStablePtr *entry
         initTimer();
         startTimer();
 
+#if defined(THREADED_RTS)
+        cap = ioManagerStartCap(cap);
+#endif
+
        cap = rts_evalStableIO(cap, entry, NULL);  // run the action
        rts_checkSchedStatus("forkProcess",cap);
        
index 3b93fcc..98115ba 100644 (file)
@@ -135,6 +135,12 @@ ioManagerDie (void)
     }
 }
 
+Capability *
+ioManagerStartCap (Capability *cap)
+{
+    return rts_evalIO(cap,&base_GHCziConc_ensureIOManagerIsRunning_closure,NULL);
+}
+
 void
 ioManagerStart (void)
 {
@@ -142,7 +148,7 @@ ioManagerStart (void)
     Capability *cap;
     if (io_manager_pipe < 0) {
        cap = rts_lock();
-       cap = rts_evalIO(cap,&base_GHCziConc_ensureIOManagerIsRunning_closure,NULL);
+       cap = ioManagerStartCap(cap);
        rts_unlock(cap);
     }
 }
index 4d0a5a5..b80f711 100644 (file)
@@ -24,6 +24,8 @@ extern siginfo_t *next_pending_handler;
 void startSignalHandlers(Capability *cap);
 #endif
 
+Capability *ioManagerStartCap (Capability *cap);
+
 extern StgInt *signal_handlers;
 
 END_RTS_PRIVATE