#include "common.h"
#include "threads-model.h"
#include "nodestack.h"
+#include "wildcard.h"
#define ACTION_INITIAL_CLOCK 0
uint64_t value, Thread *thread) :
type(type),
order(order),
+ original_order(order),
location(loc),
value(value),
reads_from(NULL),
return type == ATOMIC_INIT;
}
+bool ModelAction::is_annotation() const
+{
+ return type == ATOMIC_ANNOTATION;
+}
+
bool ModelAction::is_relaxed() const
{
return order == std::memory_order_relaxed;
return false;
// Different locations commute
- if (!same_var(act))
+ if (!same_var(act) && !is_fence() && !act->is_fence())
return false;
// Explore interleavings of seqcst writes/fences to guarantee total
case ATOMIC_TRYLOCK: return "trylock";
case ATOMIC_WAIT: return "wait";
case ATOMIC_NOTIFY_ONE: return "notify one";
- case ATOMIC_NOTIFY_ALL: return "notify all";
+ case ATOMIC_NOTIFY_ALL: return "notify all";
+ case ATOMIC_ANNOTATION: return "annotation";
default: return "unknown type";
};
}