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 486e89e..9427c7d 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) {
index f7e7e5e..66ba753 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;