/* -----------------------------------------------------------------------------
- * $Id: Schedule.h,v 1.20 2000/11/13 14:40:37 simonmar Exp $
+ * $Id: Schedule.h,v 1.23 2001/11/08 12:46:31 simonmar Exp $
*
* (c) The GHC Team 1998-1999
*
void startTasks( void );
#endif
-
//@cindex awakenBlockedQueue
/* awakenBlockedQueue()
*
extern nat timestamp;
extern nat ticks_since_timestamp;
-//@cindex Capability
-/* Capability type
- */
-typedef StgRegTable Capability;
-
/* Free capability list.
* Locks required: sched_mutex.
*/
extern Capability *free_capabilities;
extern nat n_free_capabilities;
#else
-extern Capability MainRegTable;
+extern Capability MainCapability;
#endif
/* Thread queues.
void printAllThreads(void);
#endif
void print_bq (StgClosure *node);
+#if defined(PAR)
+void print_bqe (StgBlockingQueueElement *bqe);
+#endif
/* -----------------------------------------------------------------------------
* Some convenient macros...
*/
-/* this is the NIL ptr for a TSO queue (e.g. runnable queue) */
-#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*)&stg_END_TSO_QUEUE_closure)
+/* END_TSO_QUEUE and friends now defined in includes/StgMiscClosures.h */
//@cindex APPEND_TO_RUN_QUEUE
/* Add a thread to the end of the run queue.
#define THREAD_RUNNABLE() /* nothing */
#endif
+//@cindex EMPTY_RUN_QUEUE
+/* Check whether the run queue is empty i.e. the PE is idle
+ */
+#define EMPTY_RUN_QUEUE() (run_queue_hd == END_TSO_QUEUE)
+
//@node Index, , Some convenient macros
//@subsection Index