From: Brian Norris Date: Mon, 19 Nov 2012 21:09:29 +0000 (-0800) Subject: action: add is_relaxed() function X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=commitdiff_plain;h=5cd52219ebdf8ecf620f028a7639c6c31ad17df4 action: add is_relaxed() function --- diff --git a/action.cc b/action.cc index 486e89ee..9427c7d2 100644 --- 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 f7e7e5ea..66ba753b 100644 --- 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;