X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ebb4fb025da8422b9fa57533ec966430b5fff6c..49c6310e26e0a6c7d9a0d059340913d6d3c0a880:/src/mc/transition/TransitionSynchro.hpp diff --git a/src/mc/transition/TransitionSynchro.hpp b/src/mc/transition/TransitionSynchro.hpp index 814908a998..a4ea7e3ab1 100644 --- a/src/mc/transition/TransitionSynchro.hpp +++ b/src/mc/transition/TransitionSynchro.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2015-2022. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2015-2023. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -8,8 +8,18 @@ #include "src/mc/transition/Transition.hpp" -namespace simgrid { -namespace mc { +#include + +namespace simgrid::mc { + +class BarrierTransition : public Transition { + unsigned bar_; + +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; +}; class MutexTransition : public Transition { uintptr_t mutex_; @@ -19,19 +29,23 @@ 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; + + 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; + int get_capacity() const { return capacity_; } }; -} // namespace mc -} // namespace simgrid +} // namespace simgrid::mc #endif