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

Public GIT Repository
Camel_case a forgotten function
[simgrid.git] / src / kernel / activity / IoImpl.cpp
index 966cae13da8293d4958432356e40a4c4dd750a43..565de54f7da695d0f2f794d33a365582f5ae02e3 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2021. 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. */
@@ -21,7 +21,7 @@ namespace activity {
 
 IoImpl& IoImpl::set_timeout(double timeout)
 {
-  s4u::Host* host   = get_disk() ? get_disk()->get_host() : s4u::Host::by_name(get_storage()->get_host());
+  const s4u::Host* host = get_disk() ? get_disk()->get_host() : s4u::Host::by_name(get_storage()->get_host());
   timeout_detector_ = host->pimpl_cpu->sleep(timeout);
   timeout_detector_->set_activity(this);
   return *this;
@@ -61,7 +61,6 @@ IoImpl* IoImpl::start()
   surf_action_->set_activity(this);
 
   XBT_DEBUG("Create IO synchro %p %s", this, get_cname());
-  IoImpl::on_start(*this);
 
   return this;
 }
@@ -80,13 +79,12 @@ void IoImpl::post()
     state_ = State::TIMEOUT;
   }
 
+  clean_action();
   if (timeout_detector_) {
     timeout_detector_->unref();
     timeout_detector_ = nullptr;
   }
 
-  on_completion(*this);
-
   /* Answer all simcalls associated with the synchro */
   finish();
 }
@@ -116,17 +114,11 @@ void IoImpl::finish()
         xbt_die("Internal error in IoImpl::finish(): unexpected synchro state %d", static_cast<int>(state_));
     }
 
-    simcall->issuer_->waiting_synchro = nullptr;
+    simcall->issuer_->waiting_synchro_ = nullptr;
     simcall->issuer_->simcall_answer();
   }
 }
 
-/*************
- * Callbacks *
- *************/
-xbt::signal<void(IoImpl const&)> IoImpl::on_start;
-xbt::signal<void(IoImpl const&)> IoImpl::on_completion;
-
 } // namespace activity
 } // namespace kernel
 } // namespace simgrid