-/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2022. 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. */
ConditionVariablePtr ConditionVariable::create()
{
kernel::activity::ConditionVariableImpl* cond =
- kernel::actor::simcall([] { return new kernel::activity::ConditionVariableImpl(); });
+ kernel::actor::simcall_answered([] { return new kernel::activity::ConditionVariableImpl(); });
return ConditionVariablePtr(cond->get_iface(), false);
}
*/
void ConditionVariable::notify_one()
{
- simgrid::kernel::actor::simcall([this]() { pimpl_->signal(); });
+ simgrid::kernel::actor::simcall_answered([this]() { pimpl_->signal(); });
}
void ConditionVariable::notify_all()
{
- simgrid::kernel::actor::simcall([this]() { pimpl_->broadcast(); });
+ simgrid::kernel::actor::simcall_answered([this]() { pimpl_->broadcast(); });
}
void intrusive_ptr_add_ref(const ConditionVariable* cond)
int sg_cond_wait_for(sg_cond_t cond, sg_mutex_t mutex, double delay)
{
- std::unique_lock<simgrid::s4u::Mutex> lock(*mutex);
+ std::unique_lock lock(*mutex);
return cond->wait_for(lock, delay) == std::cv_status::timeout;
}