From a9190910d12a90557d8d3d5fe7423cef77883bcd Mon Sep 17 00:00:00 2001 From: wolfgang Date: Wed, 1 Oct 2003 21:16:12 +0000 Subject: [PATCH] [project @ 2003-10-01 21:16:12 by wolfgang] Un-break non-threaded RTS (hopefully; I have no time to test it right now) --- ghc/rts/Schedule.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 9087a22..67984eb 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $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 * @@ -1639,10 +1639,8 @@ isThreadBound(StgTSO* tso USED_IN_THREADED_RTS) * Singleton fork(). Do not copy any running threads. * ------------------------------------------------------------------------- */ -#ifdef THREADED_RTS static void deleteThreadImmediately(StgTSO *tso); -#endif StgInt forkProcess(HsStablePtr *entry) @@ -1687,9 +1685,11 @@ 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); @@ -3141,6 +3141,7 @@ interruptStgRts(void) { interrupted = 1; context_switch = 1; + wakeBlockedWorkerThread(); } /* ----------------------------------------------------------------------------- @@ -3460,7 +3461,6 @@ deleteThread(StgTSO *tso) raiseAsync(tso,NULL); } -#ifdef THREADED_RTS static void deleteThreadImmediately(StgTSO *tso) { // for forkProcess only: @@ -3476,7 +3476,6 @@ deleteThreadImmediately(StgTSO *tso) unblockThread(tso); tso->what_next = ThreadKilled; } -#endif void raiseAsyncWithLock(StgTSO *tso, StgClosure *exception) -- 1.7.10.4