impatomic.h: fixup spacing
[model-checker.git] / schedule.h
1 /** @file schedule.h
2  *      @brief Thread scheduler.
3  */
4
5 #ifndef __SCHEDULE_H__
6 #define __SCHEDULE_H__
7
8 #include <list>
9 #include "mymemory.h"
10
11 /* Forward declaration */
12 class Thread;
13
14 /** @brief The Scheduler class performs the mechanics of Thread execution
15  * scheduling. */
16 class Scheduler {
17 public:
18         Scheduler();
19         void add_thread(Thread *t);
20         void remove_thread(Thread *t);
21         Thread * next_thread(void);
22         Thread * get_current_thread(void);
23         void print();
24
25         SNAPSHOTALLOC
26 private:
27         std::list<Thread *> readyList;
28         Thread *current;
29 };
30
31 #endif /* __SCHEDULE_H__ */