X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FSchedule.h;h=e7b51ba8675a040889784cc742f4bbc0007d5d83;hb=4a277ee0a14ae0747f82813548119030fbc19b0c;hp=d0c3f9923dc5d9f4e2db873205a674eda5a6cac4;hpb=9ff75d089614cce1cfa8c88344ace47698258bfa;p=ghc-hetmet.git diff --git a/ghc/rts/Schedule.h b/ghc/rts/Schedule.h index d0c3f99..e7b51ba 100644 --- a/ghc/rts/Schedule.h +++ b/ghc/rts/Schedule.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Schedule.h,v 1.18 2000/04/14 15:18:07 sewardj Exp $ + * $Id: Schedule.h,v 1.21 2000/12/04 12:31:21 simonmar Exp $ * * (c) The GHC Team 1998-1999 * @@ -85,6 +85,15 @@ void raiseAsync(StgTSO *tso, StgClosure *exception); */ void awaitEvent(rtsBool wait); /* In Select.c */ +/* wakeUpSleepingThreads(nat ticks) + * + * Wakes up any sleeping threads whose timers have expired. + * + * Called from STG : NO + * Locks assumed : sched_mutex + */ +rtsBool wakeUpSleepingThreads(nat); /* In Select.c */ + // ToDo: check whether all fcts below are used in the SMP version, too //@cindex awaken_blocked_queue #if defined(GRAN) @@ -112,7 +121,9 @@ void initThread(StgTSO *tso, nat stack_size); extern nat context_switch; extern rtsBool interrupted; -extern nat ticks_since_select; +/* In Select.c */ +extern nat timestamp; +extern nat ticks_since_timestamp; //@cindex Capability /* Capability type @@ -139,6 +150,7 @@ extern Capability MainRegTable; #else extern StgTSO *run_queue_hd, *run_queue_tl; extern StgTSO *blocked_queue_hd, *blocked_queue_tl; +extern StgTSO *sleeping_queue; #endif /* Linked list of all threads. */ extern StgTSO *all_threads; @@ -192,15 +204,9 @@ void print_bq (StgClosure *node); */ /* this is the NIL ptr for a TSO queue (e.g. runnable queue) */ -#define END_TSO_QUEUE ((StgTSO *)(void*)&END_TSO_QUEUE_closure) +#define END_TSO_QUEUE ((StgTSO *)(void*)&stg_END_TSO_QUEUE_closure) /* this is the NIL ptr for a list CAFs */ -#define END_ECAF_LIST ((StgCAF *)(void*)&END_TSO_QUEUE_closure) -#if defined(PAR) || defined(GRAN) -/* this is the NIL ptr for a blocking queue */ -# define END_BQ_QUEUE ((StgBlockingQueueElement *)(void*)&END_TSO_QUEUE_closure) -/* this is the NIL ptr for a blocked fetch queue (as in PendingFetches in GUM) */ -# define END_BF_QUEUE ((StgBlockedFetch *)(void*)&END_TSO_QUEUE_closure) -#endif +#define END_ECAF_LIST ((StgCAF *)(void*)&stg_END_TSO_QUEUE_closure) //@cindex APPEND_TO_RUN_QUEUE /* Add a thread to the end of the run queue.