-#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
+#define EMPTY_QUEUE(q) (q == END_TSO_QUEUE)
+
+#define EMPTY_RUN_QUEUE() (EMPTY_QUEUE(run_queue_hd))
+#define EMPTY_BLOCKED_QUEUE() (EMPTY_QUEUE(blocked_queue_hd))
+#define EMPTY_SLEEPING_QUEUE() (EMPTY_QUEUE(sleeping_queue))
+
+#define EMPTY_THREAD_QUEUES() (EMPTY_RUN_QUEUE() && \
+ EMPTY_BLOCKED_QUEUE() && \
+ EMPTY_SLEEPING_QUEUE())
+
+#if defined(RTS_SUPPORTS_THREADS)
+/* If no task is waiting for a capability,
+ * spawn a new worker thread.
+ *
+ * (Used by the RtsAPI)
+ */
+void
+startSchedulerTask(void);
+#endif
+
+#endif /* __SCHEDULE_H__ */