]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/activity/IoImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use CommImpl::on_start instead of Link::on_communicate for IB
[simgrid.git] / src / kernel / activity / IoImpl.cpp
index 6f77d52abf39e84844e5074fa646ba94cb6c9e5d..cb274dcdb6ef576011c234b38e99ccd94bc291a0 100644 (file)
@@ -2,18 +2,19 @@
 
 /* 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. */
-#include "src/kernel/activity/IoImpl.hpp"
+
+#include <simgrid/Exception.hpp>
+#include <simgrid/kernel/routing/NetPoint.hpp>
+#include <simgrid/s4u/Engine.hpp>
+#include <simgrid/s4u/Host.hpp>
+
 #include "mc/mc.h"
-#include "simgrid/Exception.hpp"
-#include "simgrid/kernel/resource/Action.hpp"
-#include "simgrid/kernel/routing/NetPoint.hpp"
-#include "simgrid/s4u/Engine.hpp"
-#include "simgrid/s4u/Host.hpp"
-#include "simgrid/s4u/Io.hpp"
+#include "src/kernel/activity/IoImpl.hpp"
+#include "src/kernel/actor/ActorImpl.hpp"
 #include "src/kernel/actor/SimcallObserver.hpp"
+#include "src/kernel/context/Context.hpp"
 #include "src/kernel/resource/DiskImpl.hpp"
 #include "src/mc/mc_replay.hpp"
-#include "src/simix/smx_private.hpp"
 #include "src/surf/cpu_interface.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_io, simix, "Logging specific to SIMIX (io)");
@@ -30,7 +31,7 @@ IoImpl::IoImpl()
 IoImpl& IoImpl::set_timeout(double timeout)
 {
   const s4u::Host* host = get_disk()->get_host();
-  timeout_detector_ = host->pimpl_cpu->sleep(timeout);
+  timeout_detector_     = host->get_cpu()->sleep(timeout);
   timeout_detector_->set_activity(this);
   return *this;
 }
@@ -129,6 +130,7 @@ void IoImpl::finish()
     switch (state_) {
       case State::FAILED:
         simcall->issuer_->context_->set_wannadie();
+        piface_->complete(s4u::Activity::State::FAILED);
         simcall->issuer_->exception_ =
             std::make_exception_ptr(StorageFailureException(XBT_THROW_POINT, "Storage failed"));
         break;