/* Print all model-checker output before rollback */
fflush(model_out);
- snapshotObject->backTrackBeforeStep(0);
+ snapshot_backtrack_before(0);
}
/** @return a thread ID for a new Thread */
/* Do not split atomic actions. */
if (curr->is_rmwr())
return thread_current();
- /* The THREAD_CREATE action points to the created Thread */
else if (curr->get_type() == THREAD_CREATE)
- return (Thread *)curr->get_location();
+ return curr->get_thread_operand();
}
/* Have we completed exploring the preselected path? */
pfv.act->get_node()->add_future_value(pfv.writer->get_value(), pfv.writer->get_seq_number() + params.maxfuturedelay))
set_latest_backtrack(pfv.act);
}
- futurevalues->resize(0);
+ futurevalues->clear();
}
mo_graph->commitChanges();
switch (curr->get_type()) {
case THREAD_CREATE: {
- Thread *th = (Thread *)curr->get_location();
+ Thread *th = curr->get_thread_operand();
th->set_creation(curr);
break;
}
case THREAD_JOIN: {
- Thread *blocking = (Thread *)curr->get_location();
+ Thread *blocking = curr->get_thread_operand();
ModelAction *act = get_last_action(blocking->get_id());
curr->synchronize_with(act);
updated = true; /* trigger rel-seq checks */
if (thin_air_constraint_may_allow(curr, act)) {
if (!is_infeasible() ||
(curr->is_rmw() && act->is_rmw() && curr->get_reads_from() == act->get_reads_from() && !is_infeasible_ignoreRMW())) {
- struct PendingFutureValue pfv = {curr, act};
- futurevalues->push_back(pfv);
+ futurevalues->push_back(PendingFutureValue(curr, act));
}
}
}