Commit e5959748 authored by Simon Marlow's avatar Simon Marlow

The rest of the #1185 patch (forkProcess and -threaded)

Due to darcs confusion, I managed to leave out part of the patch for
#1185.  This should make 1185(threaded1) go through now.
parent 3bc73cd6
......@@ -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);
......
......@@ -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);
}
}
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment