From 9d037f55558adc766721e3e7641616cc55d87d61 Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 12 Feb 2002 15:39:49 +0000 Subject: [PATCH] [project @ 2002-02-12 15:39:49 by sof] THREAD_RUNNABLE(): make available in threaded mode --- ghc/rts/Schedule.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ghc/rts/Schedule.h b/ghc/rts/Schedule.h index d728292..47cbd2d 100644 --- a/ghc/rts/Schedule.h +++ b/ghc/rts/Schedule.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Schedule.h,v 1.26 2002/02/04 20:40:37 sof Exp $ + * $Id: Schedule.h,v 1.27 2002/02/12 15:39:49 sof Exp $ * * (c) The GHC Team 1998-1999 * @@ -159,7 +159,9 @@ extern StgTSO *all_threads; #if defined(RTS_SUPPORTS_THREADS) extern Mutex sched_mutex; extern Condition thread_ready_cond; +# if defined(SMP) extern Condition gc_pending_cond; +# endif #endif /* Called by shutdown_handler(). */ @@ -246,9 +248,9 @@ void print_bqe (StgBlockingQueueElement *bqe); /* Signal that a runnable thread has become available, in * case there are any waiting tasks to execute it. */ -#ifdef SMP +#if defined(RTS_SUPPORTS_THREADS) #define THREAD_RUNNABLE() \ - if (free_capabilities != NULL) { \ + if ( !noCapabilities() ) { \ signalCondition(&thread_ready_cond); \ } \ context_switch = 1; @@ -260,6 +262,7 @@ void print_bqe (StgBlockingQueueElement *bqe); /* Check whether the run queue is empty i.e. the PE is idle */ #define EMPTY_RUN_QUEUE() (run_queue_hd == END_TSO_QUEUE) +#define EMPTY_QUEUE(q) (q == END_TSO_QUEUE) #endif /* __SCHEDULE_H__ */ -- 1.7.10.4