1) Add more comments.
[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 class Scheduler {
15 public:
16         Scheduler();
17         void add_thread(Thread *t);
18         void remove_thread(Thread *t);
19         Thread * next_thread(void);
20         Thread * get_current_thread(void);
21         void print();
22
23         SNAPSHOTALLOC
24 private:
25         std::list<Thread *> readyList;
26         Thread *current;
27 };
28
29 #endif /* __SCHEDULE_H__ */