projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da1e230
)
action: add is_relaxed() function
author
Brian Norris
<banorris@uci.edu>
Mon, 19 Nov 2012 21:09:29 +0000
(13:09 -0800)
committer
Brian Norris
<banorris@uci.edu>
Mon, 19 Nov 2012 21:09:29 +0000
(13:09 -0800)
action.cc
patch
|
blob
|
history
action.h
patch
|
blob
|
history
diff --git
a/action.cc
b/action.cc
index 486e89ee54aaddc8ea302c64b3a1eccef786a28c..9427c7d204e4a8e3a509f7cda437c7c67439e58f 100644
(file)
--- a/
action.cc
+++ b/
action.cc
@@
-156,6
+156,11
@@
bool ModelAction::is_initialization() const
return type == ATOMIC_INIT;
}
+bool ModelAction::is_relaxed() const
+{
+ return order == std::memory_order_relaxed;
+}
+
bool ModelAction::is_acquire() const
{
switch (order) {
diff --git
a/action.h
b/action.h
index f7e7e5ea0febd7251ff91e49654807ed9e437a95..66ba753b58131bdc1235bfd7276fc1416b8e22f3 100644
(file)
--- a/
action.h
+++ b/
action.h
@@
-106,6
+106,7
@@
public:
bool is_rmw() const;
bool is_fence() const;
bool is_initialization() const;
+ bool is_relaxed() const;
bool is_acquire() const;
bool is_release() const;
bool is_seqcst() const;