X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4de2a148bea34f550b79c07fb5e80ac36e6aa0e9..1e9ffea6fdfe24e3268eebcda6fa00d34d6a652b:/src/kernel/activity/BarrierImpl.hpp diff --git a/src/kernel/activity/BarrierImpl.hpp b/src/kernel/activity/BarrierImpl.hpp index e34ba73ac6..ed6957616d 100644 --- a/src/kernel/activity/BarrierImpl.hpp +++ b/src/kernel/activity/BarrierImpl.hpp @@ -10,10 +10,9 @@ #include "src/kernel/activity/ActivityImpl.hpp" #include "src/kernel/actor/ActorImpl.hpp" #include "src/kernel/actor/SynchroObserver.hpp" +#include "xbt/string.hpp" -namespace simgrid { -namespace kernel { -namespace activity { +namespace simgrid::kernel::activity { /** Barrier Acquisition: the act / process of acquiring the barrier. * * This is the asynchronous activity associated to Barriers. See the doc of MutexImpl for more details on the rationnal. @@ -74,8 +73,11 @@ public: } s4u::Barrier& get_iface() { return piface_; } + + std::string to_string() const + { + return xbt::string_printf("Barrier %u: %zu of %u", id_, ongoing_acquisitions_.size(), expected_actors_); + } }; -} // namespace activity -} // namespace kernel -} // namespace simgrid +} // namespace simgrid::kernel::activity #endif