action: add is_atomic_var()
[model-checker.git] / action.cc
index d418bdbb6a18ff1e3246b26ef5e8371ecde285b9..a313b70fbe970810c96fe16bc1d7a0a27108508b 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -124,6 +124,12 @@ bool ModelAction::is_failed_trylock() const
        return (type == ATOMIC_TRYLOCK && value == VALUE_TRYFAILED);
 }
 
+/** @return True if this operation is performed on a C/C++ atomic variable */
+bool ModelAction::is_atomic_var() const
+{
+       return is_read() || could_be_write();
+}
+
 bool ModelAction::is_uninitialized() const
 {
        return type == ATOMIC_UNINIT;