X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FSchedule.c;h=c58584f6939691a91aa889903e8af8f57564e8b6;hb=d9d7ceaa9f77c3d44a51405b71bb9fd4a44b6588;hp=2d99ad18bec40e644957dcfd40766b8b1bd7a0d0;hpb=efbac4137aea853ab5ac0b651cfd7c6b591904f6;p=ghc-hetmet.git diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 2d99ad1..c58584f 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.169 2003/05/14 09:11:49 simonmar Exp $ + * $Id: Schedule.c,v 1.173 2003/08/15 12:43:57 simonmar Exp $ * * (c) The GHC Team, 1998-2000 * @@ -1495,8 +1495,9 @@ run_thread: * Singleton fork(). Do not copy any running threads. * ------------------------------------------------------------------------- */ -StgInt forkProcess(StgTSO* tso) { - +StgInt +forkProcess(StgTSO* tso) +{ #ifndef mingw32_TARGET_OS pid_t pid; StgTSO* t,*next; @@ -1512,7 +1513,7 @@ StgInt forkProcess(StgTSO* tso) { } else { /* child */ /* wipe all other threads */ - run_queue_hd = run_queue_tl = tso; + run_queue_hd = run_queue_tl = END_TSO_QUEUE; tso->link = END_TSO_QUEUE; /* When clearing out the threads, we need to ensure @@ -1572,7 +1573,8 @@ StgInt forkProcess(StgTSO* tso) { * Locks: sched_mutex held. * ------------------------------------------------------------------------- */ -void deleteAllThreads ( void ) +void +deleteAllThreads ( void ) { StgTSO* t, *next; IF_DEBUG(scheduler,sched_belch("deleting all threads")); @@ -3101,6 +3103,9 @@ unblockThread(StgTSO *tso) case BlockedOnRead: case BlockedOnWrite: +#if defined(mingw32_TARGET_OS) + case BlockedOnDoProc: +#endif { /* take TSO off blocked_queue */ StgBlockingQueueElement *prev = NULL; @@ -3139,7 +3144,7 @@ unblockThread(StgTSO *tso) goto done; } } - barf("unblockThread (I/O): TSO not found"); + barf("unblockThread (delay): TSO not found"); } default: @@ -3228,6 +3233,9 @@ unblockThread(StgTSO *tso) case BlockedOnRead: case BlockedOnWrite: +#if defined(mingw32_TARGET_OS) + case BlockedOnDoProc: +#endif { StgTSO *prev = NULL; for (t = blocked_queue_hd; t != END_TSO_QUEUE; @@ -3264,7 +3272,7 @@ unblockThread(StgTSO *tso) goto done; } } - barf("unblockThread (I/O): TSO not found"); + barf("unblockThread (delay): TSO not found"); } default: @@ -3621,6 +3629,11 @@ printThreadBlockage(StgTSO *tso) case BlockedOnWrite: fprintf(stderr,"is blocked on write to fd %d", tso->block_info.fd); break; +#if defined(mingw32_TARGET_OS) + case BlockedOnDoProc: + fprintf(stderr,"is blocked on proc (request: %d)", tso->block_info.async_result->reqID); + break; +#endif case BlockedOnDelay: fprintf(stderr,"is blocked until %d", tso->block_info.target); break;