X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4d18789c406e94260275bdd03e624b82518859c3..4f76cb02e1d37e95f8e9a14fd4fc84f4b27f7661:/src/mc/transition/TransitionSynchro.cpp diff --git a/src/mc/transition/TransitionSynchro.cpp b/src/mc/transition/TransitionSynchro.cpp index a0c16de759..21ea4ec8af 100644 --- a/src/mc/transition/TransitionSynchro.cpp +++ b/src/mc/transition/TransitionSynchro.cpp @@ -29,6 +29,10 @@ bool BarrierTransition::depends(const Transition* o) const if (o->type_ < type_) return o->depends(this); + // Actions executed by the same actor are always dependent + if (o->aid_ == aid_) + return true; + if (const auto* other = dynamic_cast(o)) { if (bar_ != other->bar_) return false; @@ -121,6 +125,10 @@ bool SemaphoreTransition::depends(const Transition* o) const if (o->type_ < type_) return o->depends(this); + // Actions executed by the same actor are always dependent + if (o->aid_ == aid_) + return true; + if (const auto* other = dynamic_cast(o)) { if (sem_ != other->sem_) return false;