X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b204ff04eae43a5f5a8825141ae0647b92507bc8..c6bbeb1829c36ff45b43ab25f9d8d3f53f554d98:/include/simgrid/s4u/Barrier.hpp diff --git a/include/simgrid/s4u/Barrier.hpp b/include/simgrid/s4u/Barrier.hpp index db8e05e830..207615555f 100644 --- a/include/simgrid/s4u/Barrier.hpp +++ b/include/simgrid/s4u/Barrier.hpp @@ -20,8 +20,8 @@ namespace s4u { class XBT_PUBLIC Barrier { private: - MutexPtr mutex_; - ConditionVariablePtr cond_; + MutexPtr mutex_ = Mutex::create(); + ConditionVariablePtr cond_ = ConditionVariable::create(); unsigned int expected_actors_; unsigned int arrived_actors_ = 0; @@ -30,7 +30,7 @@ private: public: /** Creates a barrier for the given amount of actors */ - explicit Barrier(unsigned int count); + explicit Barrier(unsigned int expected_processes) : expected_actors_(expected_processes) {} #ifndef DOXYGEN ~Barrier() = default; Barrier(Barrier const&) = delete;