schedule: add replaceable scheduler struct
[model-checker.git] / schedule.h
index 801af0d839c7beb274aaadc66c719f627f2713a7..360b390512b4776d0af54eb331aa91682c4906c0 100644 (file)
@@ -2,8 +2,20 @@
 #define __SCHEDULE_H__
 
 #include "libthreads.h"
+#include "model.h"
 
+struct scheduler {
+       void (*init)(void);
+       void (*exit)(void);
+       void (*add_thread)(struct thread *t);
+       struct thread * (*next_thread)(void);
+       struct thread * (*get_current_thread)(void);
+
+       void *priv;
+};
+
+void scheduler_init(struct model_checker *mod);
 void schedule_add_thread(struct thread *t);
-int schedule_choose_next(struct thread **t);
+struct thread *schedule_choose_next(void);
 
 #endif /* __SCHEDULE_H__ */