Merge branch 'master' of /home/git/random-fuzzer into thread-switch
[c11tester.git] / model.h
diff --git a/model.h b/model.h
index 634748130ce51713d014c07903f10edf4d3a8fe1..ffc1a0c64b3175785440806f1be8c758b8ee62c1 100644 (file)
--- a/model.h
+++ b/model.h
@@ -51,6 +51,15 @@ public:
 
        void switch_from_master(Thread *thread);
        uint64_t switch_to_master(ModelAction *act);
+       uint64_t switch_thread(ModelAction *act);
+
+       void startRunExecution(Thread *old);
+       void finishRunExecution(Thread *old);
+       void consumeAction();
+       void chooseThread(ModelAction *act, Thread *thr);
+       Thread * getNextThread();
+       void handleChosenThread(Thread *old);
+       void handleNewValidThread(Thread *old, Thread *next);
 
        void assert_bug(const char *msg, ...);
 
@@ -75,6 +84,15 @@ private:
 
        int execution_number;
 
+       unsigned int curr_thread_num;
+
+       Thread * chosen_thread;
+
+       bool thread_chosen;
+       bool break_execution;
+
+       modelclock_t checkfree;
+
        unsigned int get_num_threads() const;
 
        void finish_execution(bool moreexecutions);