From: Brian Norris Date: Tue, 4 Dec 2012 00:43:19 +0000 (-0800) Subject: action: record last fence release from the current thread X-Git-Tag: oopsla2013~480 X-Git-Url: http://demsky.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=9bbf98ac065e34fc1c35538328d02d51e74ccc0f action: record last fence release from the current thread --- diff --git a/action.cc b/action.cc index 3d46bd9..5ecc1f0 100644 --- a/action.cc +++ b/action.cc @@ -31,6 +31,7 @@ ModelAction::ModelAction(action_type_t type, memory_order order, void *loc, location(loc), value(value), reads_from(NULL), + last_fence_release(NULL), node(NULL), seq_number(ACTION_INITIAL_CLOCK), cv(NULL), diff --git a/action.h b/action.h index 66ba753..4c40bd9 100644 --- a/action.h +++ b/action.h @@ -85,6 +85,12 @@ public: Node * get_node() const { return node; } void set_node(Node *n) { node = n; } + /** Store the most recent fence-release from the same thread + * @param fence The fence-release that occured prior to this */ + void set_last_fence_release(const ModelAction *fence) { last_fence_release = fence; } + /** @return The most recent fence-release from the same thread */ + const ModelAction * get_last_fence_release() const { return last_fence_release; } + void copy_from_new(ModelAction *newaction); void set_seq_number(modelclock_t num); void set_try_lock(bool obtainedlock); @@ -158,6 +164,9 @@ private: /** The action that this action reads from. Only valid for reads */ const ModelAction *reads_from; + /** The last fence release from the same thread */ + const ModelAction *last_fence_release; + /** A back reference to a Node in NodeStack, if this ModelAction is * saved on the NodeStack. */ Node *node;