+//@cindex THREAD_RUNNABLE
+/* Signal that a runnable thread has become available, in
+ * case there are any waiting tasks to execute it.
+ */
+#ifdef SMP
+#define THREAD_RUNNABLE() \
+ if (free_capabilities != NULL) { \
+ pthread_cond_signal(&thread_ready_cond); \
+ } \
+ context_switch = 1;
+#else
+#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
+
+//@index
+//* APPEND_TO_BLOCKED_QUEUE:: @cindex\s-+APPEND_TO_BLOCKED_QUEUE
+//* APPEND_TO_RUN_QUEUE:: @cindex\s-+APPEND_TO_RUN_QUEUE
+//* Capability:: @cindex\s-+Capability
+//* POP_RUN_QUEUE :: @cindex\s-+POP_RUN_QUEUE
+//* PUSH_ON_RUN_QUEUE:: @cindex\s-+PUSH_ON_RUN_QUEUE
+//* THREAD_RUNNABLE:: @cindex\s-+THREAD_RUNNABLE
+//* awaitEvent:: @cindex\s-+awaitEvent
+//* awakenBlockedQueue:: @cindex\s-+awakenBlockedQueue
+//* awaken_blocked_queue:: @cindex\s-+awaken_blocked_queue
+//* context_switch:: @cindex\s-+context_switch
+//* exitScheduler:: @cindex\s-+exitScheduler
+//* gc_pending_cond:: @cindex\s-+gc_pending_cond
+//* initScheduler:: @cindex\s-+initScheduler
+//* raiseAsync:: @cindex\s-+raiseAsync
+//* sched_mutex:: @cindex\s-+sched_mutex
+//* startTasks:: @cindex\s-+startTasks
+//* task_info:: @cindex\s-+task_info
+//* thread_ready_cond:: @cindex\s-+thread_ready_cond
+//* unblockOne:: @cindex\s-+unblockOne
+//@end index