add consume to run
[c11tester.git] / model.h
diff --git a/model.h b/model.h
index 62b227e4bcdce915125e9c8b7f9a877c94ee9529..b98e7505a4bc21664384c930392b7b1a9b2b2c47 100644 (file)
--- a/model.h
+++ b/model.h
@@ -53,6 +53,18 @@ public:
 
        void switch_from_master(Thread *thread);
        uint64_t switch_to_master(ModelAction *act);
+       uint64_t switch_thread(ModelAction *act);
+
+       void continueRunExecution(Thread *old);
+       void startRunExecution(ucontext_t *old);
+       void finishRunExecution(Thread *old);
+       void finishRunExecution(ucontext_t *old);
+       void consumeAction();
+       void chooseThread(ModelAction *act, Thread *thr);
+       Thread * getNextThread();
+       void handleChosenThread(Thread *old);
+       void handleChosenThread(ucontext_t *old);
+       void handleNewValidThread(Thread *old, Thread *next);
 
        void assert_bug(const char *msg, ...);
 
@@ -77,6 +89,14 @@ private:
 
        int execution_number;
 
+       unsigned int curr_thread_num;
+
+       Thread * chosen_thread;
+
+       bool thread_chosen;
+
+       modelclock_t checkfree;
+
        unsigned int get_num_threads() const;
 
        void finish_execution(bool moreexecutions);