snapshot: use (void *) instead of (char *)
[c11tester.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 controls the Thread execution schedule. */
15 class Scheduler {
16 public:
17         Scheduler();
18         void add_thread(Thread *t);
19         void remove_thread(Thread *t);
20         Thread * next_thread(void);
21         Thread * get_current_thread(void);
22         void print();
23
24         SNAPSHOTALLOC
25 private:
26         std::list<Thread *> readyList;
27         Thread *current;
28 };
29
30 #endif /* __SCHEDULE_H__ */