Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics: this is an ID, not a ptr
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 7 Nov 2023 15:58:04 +0000 (16:58 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 7 Nov 2023 15:58:04 +0000 (16:58 +0100)
src/mc/transition/TransitionSynchro.cpp
src/mc/transition/TransitionSynchro.hpp

index 5e7ded2..db97fb8 100644 (file)
@@ -109,9 +109,9 @@ bool MutexTransition::depends(const Transition* o) const
 std::string SemaphoreTransition::to_string(bool verbose) const
 {
   if (type_ == Type::SEM_ASYNC_LOCK || type_ == Type::SEM_UNLOCK)
-    return xbt::string_printf("%s(semaphore: %" PRIxPTR ")", Transition::to_c_str(type_), sem_);
+    return xbt::string_printf("%s(semaphore: %u)", Transition::to_c_str(type_), sem_);
   if (type_ == Type::SEM_WAIT)
-    return xbt::string_printf("%s(semaphore: %" PRIxPTR ", granted: %s)", Transition::to_c_str(type_), sem_,
+    return xbt::string_printf("%s(semaphore: %u, granted: %s)", Transition::to_c_str(type_), sem_,
                               granted_ ? "yes" : "no");
   THROW_IMPOSSIBLE;
 }
index 8742e65..66ed64c 100644 (file)
@@ -35,7 +35,7 @@ public:
 };
 
 class SemaphoreTransition : public Transition {
-  uintptr_t sem_;
+  unsigned int sem_; // ID
   bool granted_;
 
 public: