-/* Copyright (c) 2012-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2012-2023. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#define SIMGRID_KERNEL_ACTIVITY_CONDITIONVARIABLE_HPP
#include "simgrid/s4u/ConditionVariable.hpp"
+#include "src/kernel/activity/ActivityImpl.hpp"
#include "src/kernel/actor/ActorImpl.hpp"
+
#include <boost/intrusive/list.hpp>
-namespace simgrid {
-namespace kernel {
-namespace activity {
+namespace simgrid::kernel::activity {
class XBT_PUBLIC ConditionVariableImpl {
MutexImpl* mutex_ = nullptr;
public:
ConditionVariableImpl() : piface_(this){};
- ~ConditionVariableImpl() = default;
void remove_sleeping_actor(actor::ActorImpl& actor) { xbt::intrusive_erase(sleeping_, actor); }
const s4u::ConditionVariable* get_iface() const { return &piface_; }
void signal();
void wait(MutexImpl* mutex, double timeout, actor::ActorImpl* issuer);
};
-} // namespace activity
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::activity
#endif