X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=action.h;h=c39af5ecdb177aff649eb79ba39eb3eff1b3253c;hb=82df62c2b0805848b87bb71df5b66a4a66f8e25d;hp=f742ddc62854a79fd2f2aff3721914781f115b36;hpb=87d6ae25425840ccad0ef6edef6e279967e83be6;p=model-checker.git diff --git a/action.h b/action.h index f742ddc..c39af5e 100644 --- a/action.h +++ b/action.h @@ -15,6 +15,7 @@ class ClockVector; class Thread; +class Promise; using std::memory_order; using std::memory_order_relaxed; @@ -80,11 +81,13 @@ public: modelclock_t get_seq_number() const { return seq_number; } uint64_t get_value() const { return value; } const ModelAction * get_reads_from() const { return reads_from; } + const Promise * get_reads_from_promise() const { return reads_from_promise; } Node * get_node() const; void set_node(Node *n) { node = n; } void set_read_from(const ModelAction *act); + void set_read_from_promise(const Promise *promise); /** Store the most recent fence-release from the same thread * @param fence The fence-release that occured prior to this */ @@ -148,6 +151,8 @@ public: bool get_sleep_flag() { return sleep_flag; } unsigned int hash() const; + bool equals(const ModelAction *x) const { return this == x; } + bool equals(const Promise *x) const { return false; } MEMALLOC private: @@ -169,6 +174,9 @@ private: /** The action that this action reads from. Only valid for reads */ const ModelAction *reads_from; + /** The promise that this action reads from. Only valid for reads */ + const Promise *reads_from_promise; + /** The last fence release from the same thread */ const ModelAction *last_fence_release;