+ if (act != NULL && this->is_acquire()) {
+ std::vector< const ModelAction *, MyAlloc<const ModelAction *> > release_heads;
+ model->get_release_seq_heads(this, &release_heads);
+ for (unsigned int i = 0; i < release_heads.size(); i++)
+ synchronize_with(release_heads[i]);
+ }
+}
+
+/**
+ * Synchronize the current thread with the thread corresponding to the
+ * ModelAction parameter.
+ * @param act The ModelAction to synchronize with
+ */
+void ModelAction::synchronize_with(const ModelAction *act) {
+ ASSERT(*act < *this);
+ model->check_promises(cv, act->cv);
+ cv->merge(act->cv);
+}
+
+bool ModelAction::has_synchronized_with(const ModelAction *act) const
+{
+ return cv->has_synchronized_with(act->cv);