-/* Copyright (c) 2006-2018. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2019. 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. */
#ifndef SIMGRID_S4U_COND_VARIABLE_HPP
#define SIMGRID_S4U_COND_VARIABLE_HPP
+#include <simgrid/forward.h>
+
#include <simgrid/chrono.hpp>
#include <simgrid/s4u/Mutex.hpp>
*/
class XBT_PUBLIC ConditionVariable {
private:
- friend simgrid::kernel::activity::ConditionVariableImpl;
- smx_cond_t cond_;
+ friend kernel::activity::ConditionVariableImpl;
+ kernel::activity::ConditionVariableImpl* const cond_;
+
+ explicit ConditionVariable(kernel::activity::ConditionVariableImpl* cond) : cond_(cond) {}
- explicit ConditionVariable(smx_cond_t cond) : cond_(cond) {}
public:
ConditionVariable(ConditionVariable const&) = delete;
ConditionVariable& operator=(ConditionVariable const&) = delete;
static ConditionVariablePtr create();
- /** @deprecated See Comm::get_mailbox() */
- XBT_ATTRIB_DEPRECATED_v323("Please use Comm::get_mailbox()") ConditionVariablePtr createConditionVariable()
- {
- return create();
- }
-
// Wait functions without time:
void wait(MutexPtr lock);
void notify_all();
};
-}
-} // namespace simgrid::s4u
+} // namespace s4u
+} // namespace simgrid
#endif