X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e4339afd9b4ae5f3558a0348f24b0022db3501d5..97e476dc536bfd9fada85509d1c1f93714d46a10:/include/simgrid/s4u/Barrier.hpp diff --git a/include/simgrid/s4u/Barrier.hpp b/include/simgrid/s4u/Barrier.hpp index b17adf4f05..1e5e589f75 100644 --- a/include/simgrid/s4u/Barrier.hpp +++ b/include/simgrid/s4u/Barrier.hpp @@ -19,18 +19,12 @@ namespace simgrid { namespace s4u { class XBT_PUBLIC Barrier { -private: - MutexPtr mutex_ = Mutex::create(); - ConditionVariablePtr cond_ = ConditionVariable::create(); - unsigned int expected_actors_; - unsigned int arrived_actors_ = 0; + kernel::activity::BarrierImpl* pimpl_; + friend kernel::activity::BarrierImpl; - /* refcounting */ - std::atomic_int_fast32_t refcount_{0}; + explicit Barrier(kernel::activity::BarrierImpl* pimpl) : pimpl_(pimpl) {} public: - /** Creates a barrier for the given amount of actors */ - explicit Barrier(unsigned int expected_actors) : expected_actors_(expected_actors) {} #ifndef DOXYGEN Barrier(Barrier const&) = delete; Barrier& operator=(Barrier const&) = delete;