Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the dependency of barrier from the same actor [Mathieu Laurent]
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 21 Oct 2023 13:25:14 +0000 (15:25 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 21 Oct 2023 13:25:14 +0000 (15:25 +0200)
src/mc/transition/TransitionSynchro.cpp

index a0c16de..df630ee 100644 (file)
@@ -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<const BarrierTransition*>(o)) {
     if (bar_ != other->bar_)
       return false;