X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=model.h;h=115d94455c23737d949bcab4667a8bede791e037;hb=c8de5897b0c8caaab3a695dd677acd38770e48b3;hp=9e0b34ba18b25cf642a92dea56321763c23b48ba;hpb=61d1e3ae29b690f69cf77c5a6f836fb36507a694;p=c11tester.git diff --git a/model.h b/model.h index 9e0b34ba..115d9445 100644 --- a/model.h +++ b/model.h @@ -113,6 +113,7 @@ public: void remove_thread(Thread *t); Thread * get_thread(thread_id_t tid) const; Thread * get_thread(const ModelAction *act) const; + int get_promise_number(const Promise *promise) const; bool is_enabled(Thread *t) const; bool is_enabled(thread_id_t tid) const; @@ -166,7 +167,7 @@ private: Thread * take_step(ModelAction *curr); - void check_recency(ModelAction *curr, const ModelAction *rf); + bool check_recency(ModelAction *curr, const ModelAction *rf) const; ModelAction * get_last_fence_conflict(ModelAction *act) const; ModelAction * get_last_conflict(ModelAction *act) const; void set_backtracking(ModelAction *act); @@ -174,7 +175,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); @@ -194,7 +196,7 @@ private: template 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 > *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);