promise: bugfix - don't check value, check location
[c11tester.git] / promise.cc
index 23b92cd4186a59bb7a5b7c411668501afc4447e7..c695dc0ea21a4657cc04fd8601a28c77752f579b 100644 (file)
@@ -140,3 +140,13 @@ bool Promise::is_compatible_exclusive(const ModelAction *act) const
 {
        return get_num_available_threads() == 1 && is_compatible(act);
 }
+
+/**
+ * @brief Check if a ModelAction's location matches this Promise
+ * @param act The ModelAction to check
+ * @return True if the action's location matches this Promise
+ */
+bool Promise::same_location(const ModelAction *act) const
+{
+       return get_reader(0)->same_var(act);
+}