void ModelAction::read_from(const ModelAction *act)
{
ASSERT(cv);
- if (act->is_release() && this->is_acquire())
+ if (act->is_release() && this->is_acquire()) {
+ synchronized(act);
cv->merge(act->cv);
+ }
reads_from = act;
}
+
+/** Synchronize the current thread with the thread corresponding to
+ * the ModelAction parameter. */
+
+void ModelAction::synchronized(const ModelAction *act) {
+ model->check_promises(cv, act->cv);
+ cv->merge(act->cv);
+}
+
/**
* Check whether 'this' happens before act, according to the memory-model's
* happens before relation. This is checked via the ClockVector constructs.