Two related fixes:
Even if parent is NULL, pass the current ModelAction to ClockVector
constructor.
When no parent is present, do not make special case for initializing
clock[0] = 1. This is only correct for a single case (the root Action)
and is already handled in other ways.
if (parent)
cv = new ClockVector(parent->cv, this);
else
- cv = new ClockVector();
+ cv = new ClockVector(NULL, this);
}
void ModelAction::read_from(ModelAction *act)
memset(clock, 0, num_threads * sizeof(int));
if (parent)
std::memcpy(clock, parent->clock, parent->num_threads * sizeof(int));
- else
- clock[0] = 1;
if (act)
clock[id_to_int(act->get_tid())] = act->get_seq_number();