scanalysis: install ModelExecution object in the analysis
[c11tester.git] / schedule.h
index 121da08db05a3d0d735c4ca34926006b364c85cb..4c67c28492b9cc24facc2e43827eee2ca198f28d 100644 (file)
@@ -18,6 +18,8 @@ typedef enum enabled_type {
        THREAD_SLEEP_SET
 } enabled_type_t;
 
+void enabled_type_to_string(enabled_type_t e, char *str);
+
 /** @brief The Scheduler class performs the mechanics of Thread execution
  * scheduling. */
 class Scheduler {
@@ -27,7 +29,7 @@ public:
        void remove_thread(Thread *t);
        void sleep(Thread *t);
        void wake(Thread *t);
-       Thread * select_next_thread();
+       Thread * select_next_thread(Node *n);
        void set_current_thread(Thread *t);
        Thread * get_current_thread() const;
        void print() const;
@@ -39,6 +41,8 @@ public:
        bool is_enabled(const Thread *t) const;
        bool is_enabled(thread_id_t tid) const;
        bool is_sleep_set(const Thread *t) const;
+       bool all_threads_sleeping() const;
+       void set_scheduler_thread(thread_id_t tid);
 
        SNAPSHOTALLOC
 private: