*/
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);
}
/**
ClockVector * get_cv(thread_id_t tid) const;
ModelAction * get_parent_action(thread_id_t tid) const;
void check_promises_thread_disabled();
- void check_promises(thread_id_t tid, ClockVector *old_cv, ClockVector *merge_cv);
bool isfeasibleprefix() const;
bool assert_bug(const char *msg, ...);
void compute_promises(ModelAction *curr);
void compute_relseq_breakwrites(ModelAction *curr);
+ void check_promises(thread_id_t tid, ClockVector *old_cv, ClockVector *merge_cv);
void mo_check_promises(const ModelAction *act, bool is_read_check);
void thread_blocking_check_promises(Thread *blocker, Thread *waiting);