Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix a dead store reported by infer
[simgrid.git] / src / mc / transition / TransitionSynchro.hpp
index a290ba45f38900629e9f91107c7fbd08e6f3a7c9..d8b7d030ebb0a6077952e704e6ce7a0623962c31 100644 (file)
@@ -19,6 +19,7 @@ public:
   std::string to_string(bool verbose) const override;
   BarrierTransition(aid_t issuer, int times_considered, Type type, std::stringstream& stream);
   bool depends(const Transition* other) const override;
+  bool reversible_race(const Transition* other) const override;
 };
 
 class MutexTransition : public Transition {
@@ -29,18 +30,24 @@ public:
   std::string to_string(bool verbose) const override;
   MutexTransition(aid_t issuer, int times_considered, Type type, std::stringstream& stream);
   bool depends(const Transition* other) const override;
+  bool reversible_race(const Transition* other) const override;
 
   uintptr_t get_mutex() const { return this->mutex_; }
+  aid_t get_owner() const { return this->owner_; }
 };
 
 class SemaphoreTransition : public Transition {
-  uintptr_t sem_;
+  unsigned int sem_; // ID
   bool granted_;
+  unsigned capacity_;
 
 public:
   std::string to_string(bool verbose) const override;
   SemaphoreTransition(aid_t issuer, int times_considered, Type type, std::stringstream& stream);
   bool depends(const Transition* other) const override;
+  bool reversible_race(const Transition* other) const override;
+
+  int get_capacity() const { return capacity_; }
 };
 
 } // namespace simgrid::mc