scheduler: kill 'replaceable' scheduler
[model-checker.git] / schedule.h
index 762e16818ed220dfc3a313a0b297638d7e9bfddd..83416008eb01f2e0dba5e3886e49fdda52e68846 100644 (file)
@@ -1,25 +1,19 @@
 #ifndef __SCHEDULE_H__
 #define __SCHEDULE_H__
 
-#include <list>
+#include <queue>
 
 #include "libthreads.h"
 #include "model.h"
 
 class Scheduler {
-public:
-       virtual void add_thread(struct thread *t) = 0;
-       virtual struct thread * next_thread(void) = 0;
-       virtual struct thread * get_current_thread(void) = 0;
-};
-
-class DefaultScheduler: public Scheduler {
 public:
        void add_thread(struct thread *t);
        struct thread * next_thread(void);
        struct thread * get_current_thread(void);
 private:
-       std::list<struct thread *> queue;
+       std::queue<struct thread *> queue;
+       struct thread *current;
 };
 
 #endif /* __SCHEDULE_H__ */