scheduler: kill 'replaceable' scheduler
[model-checker.git] / schedule.h
index 801af0d839c7beb274aaadc66c719f627f2713a7..83416008eb01f2e0dba5e3886e49fdda52e68846 100644 (file)
@@ -1,9 +1,19 @@
 #ifndef __SCHEDULE_H__
 #define __SCHEDULE_H__
 
+#include <queue>
+
 #include "libthreads.h"
+#include "model.h"
 
-void schedule_add_thread(struct thread *t);
-int schedule_choose_next(struct thread **t);
+class Scheduler {
+public:
+       void add_thread(struct thread *t);
+       struct thread * next_thread(void);
+       struct thread * get_current_thread(void);
+private:
+       std::queue<struct thread *> queue;
+       struct thread *current;
+};
 
 #endif /* __SCHEDULE_H__ */