projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7888740
)
action: record last fence release from the current thread
author
Brian Norris
<banorris@uci.edu>
Tue, 4 Dec 2012 00:43:19 +0000
(16:43 -0800)
committer
Brian Norris
<banorris@uci.edu>
Tue, 4 Dec 2012 02:26:48 +0000
(18:26 -0800)
action.cc
patch
|
blob
|
history
action.h
patch
|
blob
|
history
diff --git
a/action.cc
b/action.cc
index 3d46bd91aa0de6a2dd1a5729a1867fd3737343b3..5ecc1f0e1b26f069650a47e139858eef68e05595 100644
(file)
--- 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),
location(loc),
value(value),
reads_from(NULL),
+ last_fence_release(NULL),
node(NULL),
seq_number(ACTION_INITIAL_CLOCK),
cv(NULL),
node(NULL),
seq_number(ACTION_INITIAL_CLOCK),
cv(NULL),
diff --git
a/action.h
b/action.h
index 66ba753b58131bdc1235bfd7276fc1416b8e22f3..4c40bd9bf9a4554ed7c984158334f359346031c5 100644
(file)
--- a/
action.h
+++ b/
action.h
@@
-85,6
+85,12
@@
public:
Node * get_node() const { return node; }
void set_node(Node *n) { node = n; }
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);
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 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;
/** A back reference to a Node in NodeStack, if this ModelAction is
* saved on the NodeStack. */
Node *node;