action: add is_relaxed() function
authorBrian Norris <banorris@uci.edu>
Mon, 19 Nov 2012 21:09:29 +0000 (13:09 -0800)
committerBrian Norris <banorris@uci.edu>
Mon, 19 Nov 2012 21:09:29 +0000 (13:09 -0800)
action.cc
action.h

index 486e89ee54aaddc8ea302c64b3a1eccef786a28c..9427c7d204e4a8e3a509f7cda437c7c67439e58f 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -156,6 +156,11 @@ bool ModelAction::is_initialization() const
        return type == ATOMIC_INIT;
 }
 
        return type == ATOMIC_INIT;
 }
 
+bool ModelAction::is_relaxed() const
+{
+       return order == std::memory_order_relaxed;
+}
+
 bool ModelAction::is_acquire() const
 {
        switch (order) {
 bool ModelAction::is_acquire() const
 {
        switch (order) {
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_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;
        bool is_acquire() const;
        bool is_release() const;
        bool is_seqcst() const;