check_recency: refactor some more, + include Promises
[c11tester.git] / model.h
diff --git a/model.h b/model.h
index e92137d1c17b6222f867cd27cfdc568625dd9bd2..3f4ca001aa8c85d85564cf012d10bf37b6182614 100644 (file)
--- a/model.h
+++ b/model.h
@@ -167,7 +167,11 @@ private:
 
        Thread * take_step(ModelAction *curr);
 
-       void check_recency(ModelAction *curr, const ModelAction *rf);
+       bool check_recency(ModelAction *curr, const ModelAction *rf) const;
+
+       template <typename T>
+       bool should_read_instead(const ModelAction *curr, const ModelAction *rf, const T *other_rf) const;
+
        ModelAction * get_last_fence_conflict(ModelAction *act) const;
        ModelAction * get_last_conflict(ModelAction *act) const;
        void set_backtracking(ModelAction *act);
@@ -175,7 +179,8 @@ private:
        bool set_latest_backtrack(ModelAction *act);
        ModelAction * get_next_backtrack();
        void reset_to_initial_state();
-       bool resolve_promises(ModelAction *curr);
+       int get_promise_to_resolve(const ModelAction *curr) const;
+       bool resolve_promise(ModelAction *curr, unsigned int promise_idx);
        void compute_promises(ModelAction *curr);
        void compute_relseq_breakwrites(ModelAction *curr);
 
@@ -195,7 +200,7 @@ private:
        template <typename rf_type>
        bool r_modification_order(ModelAction *curr, const rf_type *rf);
 
-       bool w_modification_order(ModelAction *curr);
+       bool w_modification_order(ModelAction *curr, std::vector< ModelAction *, ModelAlloc<ModelAction *> > *send_fv);
        void get_release_seq_heads(ModelAction *acquire, ModelAction *read, rel_heads_list_t *release_heads);
        bool release_seq_heads(const ModelAction *rf, rel_heads_list_t *release_heads, struct release_seq *pending) const;
        bool resolve_release_sequences(void *location, work_queue_t *work_queue);