X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9fc682676a33abb6a4cc527c09a34db3c33e5711..0f0aacb167ddc9427ea1da1c8f1b66ef2d6f532e:/src/mc/transition/TransitionSynchro.cpp diff --git a/src/mc/transition/TransitionSynchro.cpp b/src/mc/transition/TransitionSynchro.cpp index f98a352af3..8486a0ca83 100644 --- a/src/mc/transition/TransitionSynchro.cpp +++ b/src/mc/transition/TransitionSynchro.cpp @@ -109,11 +109,10 @@ 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: %u, capacity: %u)", Transition::to_c_str(type_), sem_, capacity_); + return xbt::string_printf("%s(semaphore: %u, capacity: %u)", Transition::to_c_str(type_), sem_, capacity_); if (type_ == Type::SEM_WAIT) return xbt::string_printf("%s(semaphore: %u, capacity: %u, granted: %s)", Transition::to_c_str(type_), sem_, - capacity_, - granted_ ? "yes" : "no"); + capacity_, granted_ ? "yes" : "no"); THROW_IMPOSSIBLE; } SemaphoreTransition::SemaphoreTransition(aid_t issuer, int times_considered, Type type, std::stringstream& stream) @@ -148,9 +147,9 @@ bool SemaphoreTransition::depends(const Transition* o) const return false; // UNLCOK indep with a WAIT if the semaphore had enought capacity anyway - if (type_ == Type::SEM_UNLOCK && capacity_ > 1 && other->type_ == Type::SEM_WAIT ) + if (type_ == Type::SEM_UNLOCK && capacity_ > 1 && other->type_ == Type::SEM_WAIT) return false; - + // WAIT indep WAIT: // if both enabled (may happen in the initial value is sufficient), the ordering has no impact on the result. // If only one enabled, the other won't be enabled by the first one. @@ -158,7 +157,6 @@ bool SemaphoreTransition::depends(const Transition* o) const if (type_ == Type::SEM_WAIT && other->type_ == Type::SEM_WAIT) return false; - return true; // Other semaphore cases are dependent }