2 * @brief Thread scheduler.
11 /* Forward declaration */
15 typedef enum enabled_type {
21 /** @brief The Scheduler class performs the mechanics of Thread execution
26 void add_thread(Thread *t);
27 void remove_thread(Thread *t);
28 void sleep(Thread *t);
30 Thread * next_thread(Thread *t);
31 Thread * get_current_thread() const;
33 enabled_type_t * get_enabled() { return is_enabled; };
34 void remove_sleep(Thread *t);
35 void add_sleep(Thread *t);
36 enabled_type_t get_enabled(Thread *t);
37 void update_sleep_set(Node *n);
40 /** The list of available Threads that are not currently running */
41 enabled_type_t * is_enabled;
43 int curr_thread_index;
44 void set_enabled(Thread *t, enabled_type_t enabled_status);
46 /** The currently-running Thread */
50 #endif /* __SCHEDULE_H__ */