-/* Copyright (c) 2007-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2007-2020. 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. */
synchro->state_ = simgrid::kernel::activity::State::TIMEOUT;
}
synchro->finish();
+ return;
}
/* If the synchro is already finished then perform the error handling */
else {
/* we need a sleep action (even when there is no timeout) to be notified of host failures */
if (synchro->get_disk() != nullptr)
- synchro->timeout_detector_ = synchro->get_disk()->get_host()->pimpl_cpu->sleep(timeout);
+ synchro->set_timeout_detector(synchro->get_disk()->get_host()->pimpl_cpu->sleep(timeout));
else
- synchro->timeout_detector_ =
- simgrid::s4u::Host::by_name(synchro->get_storage()->get_host())->pimpl_cpu->sleep(timeout);
- synchro->timeout_detector_->set_activity(synchro);
+ synchro->set_timeout_detector(
+ simgrid::s4u::Host::by_name(synchro->get_storage()->get_host())->pimpl_cpu->sleep(timeout));
}
}
void IoImpl::finish()
{
while (not simcalls_.empty()) {
- smx_simcall_t simcall = simcalls_.front();
+ const s_smx_simcall* simcall = simcalls_.front();
simcalls_.pop_front();
switch (state_) {
case State::DONE:
/* do nothing, synchro done */
break;
case State::FAILED:
- simcall->issuer_->context_->iwannadie = true;
+ simcall->issuer_->context_->set_wannadie();
simcall->issuer_->exception_ =
std::make_exception_ptr(StorageFailureException(XBT_THROW_POINT, "Storage failed"));
break;