X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=action.cc;h=33dbe75b22c7c3daf8f25f0b51f4a077d652e682;hp=33c69656d7702d757cd90d44a5884fdef99e2864;hb=5e4a7d161cba81152ddcf295ee72fbb25ba3afaa;hpb=bdef0741b8a01e16946d261bc2a657af5a683b3e diff --git a/action.cc b/action.cc index 33c69656..33dbe75b 100644 --- a/action.cc +++ b/action.cc @@ -165,11 +165,22 @@ void ModelAction::create_cv(const ModelAction *parent) 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.