1 /* Copyright (c) 2018. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #ifndef SIMGRID_S4U_BARRIER_HPP
7 #define SIMGRID_S4U_BARRIER_HPP
9 #include "simgrid/s4u/ConditionVariable.hpp"
10 #include <simgrid/chrono.hpp>
11 #include <simgrid/s4u/Mutex.hpp>
18 class XBT_PUBLIC Barrier {
21 ConditionVariablePtr cond_;
22 unsigned int expected_processes_;
23 unsigned int arrived_processes_ = 0;
26 explicit Barrier(unsigned int count);
28 Barrier(Barrier const&) = delete;
29 Barrier& operator=(Barrier const&) = delete;
34 } // namespace simgrid::s4u