#include "src/kernel/activity/ActivityImpl.hpp"
#include "src/kernel/activity/CommImpl.hpp"
-#include "src/kernel/activity/SynchroRaw.hpp"
+#include "src/kernel/activity/Synchro.hpp"
#include "src/kernel/actor/ActorImpl.hpp"
#include "src/kernel/actor/SimcallObserver.hpp"
#include "src/kernel/resource/CpuImpl.hpp"
} else {
/* we need a sleep action (even when the timeout is infinite) to be notified of host failures */
/* Comms handle that a bit differently of the other activities */
- auto* comm = dynamic_cast<CommImpl*>(this);
- if (comm != nullptr) {
+ if (auto* comm = dynamic_cast<CommImpl*>(this)) {
resource::Action* sleep = issuer->get_host()->get_cpu()->sleep(timeout);
sleep->set_activity(comm);
else
comm->dst_timeout_ = sleep;
} else {
- RawImplPtr synchro(new RawImpl([this, issuer]() {
+ SynchroImplPtr synchro(new SynchroImpl([this, issuer]() {
this->unregister_simcall(&issuer->simcall_);
issuer->waiting_synchro_ = nullptr;
issuer->exception_ = nullptr;
auto* observer = dynamic_cast<kernel::actor::ActivityWaitSimcall*>(issuer->simcall_.observer_);
xbt_assert(observer != nullptr);
- observer->set_result(true);
+ observer->set_result(true); // Returns that the wait_for timeouted
}));
synchro->set_host(issuer->get_host()).set_timeout(timeout).start();
synchro->register_simcall(&issuer->simcall_);