/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.177 2003/10/01 10:57:42 wolfgang Exp $
+ * $Id: Schedule.c,v 1.178 2003/10/01 21:16:12 wolfgang Exp $
*
* (c) The GHC Team, 1998-2000
*
* Singleton fork(). Do not copy any running threads.
* ------------------------------------------------------------------------- */
-#ifdef THREADED_RTS
static void
deleteThreadImmediately(StgTSO *tso);
-#endif
StgInt
forkProcess(HsStablePtr *entry)
stgFree(m);
}
+#ifdef RTS_SUPPORTS_THREADS
resetTaskManagerAfterFork(); // tell startTask() and friends that
startingWorkerThread = rtsFalse; // we have no worker threads any more
resetWorkerWakeupPipeAfterFork();
+#endif
rc = rts_evalStableIO(entry, NULL); // run the action
rts_checkSchedStatus("forkProcess",rc);
{
interrupted = 1;
context_switch = 1;
+ wakeBlockedWorkerThread();
}
/* -----------------------------------------------------------------------------
raiseAsync(tso,NULL);
}
-#ifdef THREADED_RTS
static void
deleteThreadImmediately(StgTSO *tso)
{ // for forkProcess only:
unblockThread(tso);
tso->what_next = ThreadKilled;
}
-#endif
void
raiseAsyncWithLock(StgTSO *tso, StgClosure *exception)