Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Actions executed by the same actor are always dependent, damnit
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 6 Nov 2023 16:59:26 +0000 (17:59 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 6 Nov 2023 16:59:26 +0000 (17:59 +0100)
src/mc/transition/TransitionSynchro.cpp

index df630ee..5e7ded2 100644 (file)
@@ -125,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<const SemaphoreTransition*>(o)) {
     if (sem_ != other->sem_)
       return false;