X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a21c899e4be4bccd122de490e9aa3348e436b81f..4a4d0d50d8a6fbd0b50172905f7ad5cf5ed0f9a0:/src/kernel/activity/IoImpl.cpp diff --git a/src/kernel/activity/IoImpl.cpp b/src/kernel/activity/IoImpl.cpp index 8472157856..8125e0e595 100644 --- a/src/kernel/activity/IoImpl.cpp +++ b/src/kernel/activity/IoImpl.cpp @@ -1,4 +1,4 @@ -/* 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. */ @@ -34,6 +34,7 @@ void simcall_HANDLER_io_wait(smx_simcall_t simcall, simgrid::kernel::activity::I synchro->state_ = simgrid::kernel::activity::State::TIMEOUT; } synchro->finish(); + return; } /* If the synchro is already finished then perform the error handling */ @@ -42,11 +43,10 @@ void simcall_HANDLER_io_wait(smx_simcall_t simcall, simgrid::kernel::activity::I 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)); } } @@ -134,14 +134,14 @@ void IoImpl::post() 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;