From 5cd52219ebdf8ecf620f028a7639c6c31ad17df4 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Mon, 19 Nov 2012 13:09:29 -0800 Subject: [PATCH] action: add is_relaxed() function --- action.cc | 5 +++++ action.h | 1 + 2 files changed, 6 insertions(+) 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; -- 2.34.1