trace_ref(NULL),
thrdmap_ref(NULL),
action_ref(NULL),
+ func_ref_count(0),
value(value),
type(type),
+ original_type(ATOMIC_NOP),
+ swap_flag(false),
order(order),
original_order(order),
seq_number(ACTION_INITIAL_CLOCK)
{
/* References to NULL atomic variables can end up here */
- ASSERT(loc || type == ATOMIC_FENCE);
+ ASSERT(loc || type == ATOMIC_FENCE || type == ATOMIC_NOP);
Thread *t = thread ? thread : thread_current();
this->tid = t!= NULL ? t->get_id() : -1;
trace_ref(NULL),
thrdmap_ref(NULL),
action_ref(NULL),
+ func_ref_count(0),
value(value),
type(type),
+ original_type(ATOMIC_NOP),
+ swap_flag(false),
order(order),
original_order(order),
seq_number(ACTION_INITIAL_CLOCK)
trace_ref(NULL),
thrdmap_ref(NULL),
action_ref(NULL),
+ func_ref_count(0),
value(value),
type(type),
+ original_type(ATOMIC_NOP),
+ swap_flag(false),
order(order),
original_order(order),
seq_number(ACTION_INITIAL_CLOCK)
trace_ref(NULL),
thrdmap_ref(NULL),
action_ref(NULL),
+ func_ref_count(0),
value(value),
type(type),
+ original_type(ATOMIC_NOP),
+ swap_flag(false),
order(order),
original_order(order),
seq_number(ACTION_INITIAL_CLOCK)
trace_ref(NULL),
thrdmap_ref(NULL),
action_ref(NULL),
+ func_ref_count(0),
value(value),
type(type),
+ original_type(ATOMIC_NOP),
+ swap_flag(false),
order(order),
original_order(order),
seq_number(ACTION_INITIAL_CLOCK)
else
return NULL;
}
+
+/** @brief Swap type with original type */
+void ModelAction::use_original_type()
+{
+ action_type_t tmp = type;
+ type = original_type;
+ original_type = tmp;
+
+ if (swap_flag)
+ swap_flag = false;
+ else
+ swap_flag = true;
+}