Merge commit: branch 'work'
[c11tester.git] / schedule.h
1 #ifndef __SCHEDULE_H__
2 #define __SCHEDULE_H__
3
4 #include <list>
5 #include "mymemory.h"
6
7 /* Forward declaration */
8 class Thread;
9
10 class Scheduler {
11 public:
12         Scheduler();
13         void add_thread(Thread *t);
14         void remove_thread(Thread *t);
15         Thread * next_thread(void);
16         Thread * get_current_thread(void);
17         void print();
18   MEMALLOC
19 private:
20         std::list<Thread *, MyAlloc< Thread * > > readyList;
21         Thread *current;
22 };
23
24 #endif /* __SCHEDULE_H__ */