return ++priv->used_sequence_numbers;
}
-Node * ModelChecker::get_curr_node() const
-{
- return node_stack->get_head();
-}
-
/**
* @brief Select the next thread to execute based on the curren action
*
* scheduler decide
*/
if (diverge == NULL)
- return scheduler->select_next_thread();
+ return scheduler->select_next_thread(node_stack->get_head());
/* Else, we are trying to replay an execution */
ModelAction *next = node_stack->get_next()->get_action();
*/
bool ModelChecker::synchronize(const ModelAction *first, ModelAction *second)
{
- if (!second->synchronize_with(first)) {
+ if (*second < *first) {
set_bad_synchronization();
return false;
}
- return true;
+ check_promises(first->get_tid(), second->get_cv(), first->get_cv());
+ return second->synchronize_with(first);
}
/**