eb0f68c74be5cdf101fca6f6c6166680c6f21d90
[c11tester.git] / schedule.h
1 #ifndef __SCHEDULE_H__
2 #define __SCHEDULE_H__
3
4 #include "libthreads.h"
5 #include "model.h"
6
7 class Scheduler {
8 public:
9         virtual void add_thread(struct thread *t) = 0;
10         virtual struct thread * next_thread(void) = 0;
11         virtual struct thread * get_current_thread(void) = 0;
12 };
13
14 class DefaultScheduler: public Scheduler {
15 public:
16         void add_thread(struct thread *t);
17         struct thread * next_thread(void);
18         struct thread * get_current_thread(void);
19 };
20
21 #endif /* __SCHEDULE_H__ */