*/
ModelAction::ModelAction(action_type_t type, memory_order order, void *loc,
uint64_t value, Thread *thread) :
- type(type),
- order(order),
- original_order(order),
location(loc),
- value(value),
reads_from(NULL),
last_fence_release(NULL),
node(NULL),
- seq_number(ACTION_INITIAL_CLOCK),
- cv(NULL)
+ cv(NULL),
+ value(value),
+ type(type),
+ order(order),
+ original_order(order),
+ seq_number(ACTION_INITIAL_CLOCK)
{
/* References to NULL atomic variables can end up here */
ASSERT(loc || type == ATOMIC_FENCE);
*/
ModelAction::ModelAction(action_type_t type, memory_order order, void *loc,
uint64_t value, int size) :
- type(type),
- order(order),
- original_order(order),
location(loc),
- value(value),
reads_from(NULL),
last_fence_release(NULL),
node(NULL),
- seq_number(ACTION_INITIAL_CLOCK),
- cv(NULL)
+ cv(NULL),
+ value(value),
+ type(type),
+ order(order),
+ original_order(order),
+ seq_number(ACTION_INITIAL_CLOCK)
{
/* References to NULL atomic variables can end up here */
ASSERT(loc);
ASSERT(is_read());
if (reads_from)
return reads_from->get_write_value();
- return VALUE_NONE; /* Only for new actions with no reads-from */
+ return VALUE_NONE; // Only for new actions with no reads-from
}
/**
reads_from = act;
- if (act->is_uninitialized()) { // WL
+ if (act->is_uninitialized()) { // WL
uint64_t val = *((uint64_t *) location);
ModelAction * act_initialized = (ModelAction *)act;
act_initialized->set_value(val);