Two change:
[c11tester.git] / model.h
diff --git a/model.h b/model.h
index 47f5139ba1b82ebe63c804b32945bffd31325bd0..4b9e3ff53f0082b30efd095b5618186480882d5e 100644 (file)
--- a/model.h
+++ b/model.h
@@ -34,6 +34,8 @@ typedef std::vector< const ModelAction *, MyAlloc<const ModelAction *> > rel_hea
 struct model_params {
        int maxreads;
        int maxfuturedelay;
+       unsigned int fairwindow;
+       unsigned int enabledcount;
 };
 
 struct PendingFutureValue {
@@ -90,6 +92,12 @@ public:
        bool isfeasibleprefix();
        void set_assert() {asserted=true;}
 
+       /** @brief Alert the model-checker that an incorrectly-ordered
+        * synchronization was made */
+       void set_bad_synchronization() { bad_synchronization = true; }
+
+       const model_params params;
+
        MEMALLOC
 private:
        /** The scheduler to use: tracks the running/ready Threads */
@@ -101,7 +109,6 @@ private:
        int num_executions;
        int num_feasible_executions;
        bool promises_expired();
-       const model_params params;
 
        /**
         * Stores the ModelAction for the current thread action.  Call this
@@ -114,12 +121,13 @@ private:
        ModelAction * initialize_curr_action(ModelAction *curr);
        bool process_read(ModelAction *curr, bool second_part_of_rmw);
        bool process_write(ModelAction *curr);
-       void process_mutex(ModelAction *curr);
+       bool process_mutex(ModelAction *curr);
+       bool process_thread_action(ModelAction *curr);
        bool check_action_enabled(ModelAction *curr);
 
        bool take_step();
 
-       void check_recency(ModelAction *curr);
+       void check_recency(ModelAction *curr, const ModelAction *rf);
        ModelAction * get_last_conflict(ModelAction *act);
        void set_backtracking(ModelAction *act);
        Thread * get_next_thread(ModelAction *curr);
@@ -193,6 +201,8 @@ private:
        bool failed_promise;
        bool too_many_reads;
        bool asserted;
+       /** @brief Incorrectly-ordered synchronization was made */
+       bool bad_synchronization;
 };
 
 extern ModelChecker *model;