1 /* -----------------------------------------------------------------------------
2 * $Id: Schedule.h,v 1.2 1998/12/02 13:28:46 simonm Exp $
4 * (c) The GHC Team 1998
6 * Prototypes for functions in Schedule.c
7 * (RTS internal scheduler interface)
9 * ---------------------------------------------------------------------------*/
15 void initScheduler(void);
21 void awaken_blocked_queue(StgTSO *tso);
23 void initThread(StgTSO *tso, nat stack_size);
25 void interruptStgRts(void);
27 extern nat context_switch;
29 extern StgTSO *run_queue_hd, *run_queue_tl;
30 extern StgTSO *blocked_queue_hd, *blocked_queue_tl;
32 extern StgTSO *MainTSO; /* temporary hack */
34 #define END_TSO_QUEUE ((StgTSO *)(void*)&END_TSO_QUEUE_closure)
36 #define PUSH_ON_RUN_QUEUE(tso) \
37 if (run_queue_hd == END_TSO_QUEUE) { \
40 run_queue_tl->link = tso; \
44 #define END_CAF_LIST stgCast(StgCAF*,(void*)&END_TSO_QUEUE_closure)