1 /* Copyright (c) 2012-2019. 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_KERNEL_ACTIVITY_CONDITIONVARIABLEIMPL_HPP
7 #define SIMGRID_KERNEL_ACTIVITY_CONDITIONVARIABLEIMPL_HPP
9 #include "simgrid/s4u/ConditionVariable.hpp"
10 #include "src/simix/ActorImpl.hpp"
11 #include <boost/intrusive/list.hpp>
17 class XBT_PUBLIC ConditionVariableImpl {
19 ConditionVariableImpl();
20 ~ConditionVariableImpl();
22 simgrid::kernel::actor::SynchroList sleeping; /* list of sleeping processes */
23 smx_mutex_t mutex = nullptr;
24 simgrid::s4u::ConditionVariable cond_;
30 std::atomic_int_fast32_t refcount_{1};
31 friend void intrusive_ptr_add_ref(ConditionVariableImpl* cond);
32 friend void intrusive_ptr_release(ConditionVariableImpl* cond);
34 } // namespace activity
36 } // namespace simgrid