cv = new ClockVector(NULL, this);
}
-
/** Update the model action's read_from action */
void ModelAction::read_from(const ModelAction *act)
{
ASSERT(cv);
if (act!=NULL && act->is_release() && this->is_acquire()) {
- synchronized(act);
+ synchronize_with(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) {
+/**
+ * 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) {
model->check_promises(cv, act->cv);
cv->merge(act->cv);
}
void create_cv(const ModelAction *parent = NULL);
ClockVector * get_cv() const { return cv; }
void read_from(const ModelAction *act);
- void synchronized(const ModelAction *act);
-
bool happens_before(const ModelAction *act) const;
MEMALLOC
private:
+ void synchronize_with(const ModelAction *act);
/** Type of action (read, write, thread create, thread yield, thread join) */
action_type type;