scheduler: kill 'replaceable' scheduler
[model-checker.git] / schedule.h
index ac69fa1163bfdfb3d8aff5a1f4ad249cdecb54e0..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);
-struct thread *schedule_choose_next(void);
+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__ */