Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Spell check.
[simgrid.git] / src / kernel / activity / ExecImpl.cpp
index ea1159d2955c2b4d2998b4b95f194efcfe5bce4d..7c899d4b0a12310606691decf7a42500a68cb1ee 100644 (file)
@@ -56,7 +56,7 @@ void simcall_HANDLER_execution_waitany_for(smx_simcall_t simcall, simgrid::kerne
   } else {
     simcall->timeout_cb_ = simgrid::simix::Timer::set(SIMIX_get_clock() + timeout, [simcall, execs, count]() {
       for (size_t i = 0; i < count; i++) {
-        // Remove the first occurence of simcall:
+        // Remove the first occurrence of simcall:
         auto* exec = execs[i];
         auto j     = boost::range::find(exec->simcalls_, simcall);
         if (j != exec->simcalls_.end())
@@ -153,7 +153,6 @@ ExecImpl* ExecImpl::start()
   }
 
   XBT_DEBUG("Create execute synchro %p: %s", this, get_cname());
-  ExecImpl::on_creation(*this);
   return this;
 }
 
@@ -195,8 +194,6 @@ void ExecImpl::post()
     state_ = SIMIX_DONE;
   }
 
-  on_completion(*this);
-
   clean_action();
 
   if (timeout_detector_) {
@@ -204,9 +201,8 @@ void ExecImpl::post()
     timeout_detector_ = nullptr;
   }
 
-  /* If there are simcalls associated with the synchro, then answer them */
-  if (not simcalls_.empty())
-    finish();
+  /* Answer all simcalls associated with the synchro */
+  finish();
 }
 
 void ExecImpl::finish()
@@ -226,7 +222,7 @@ void ExecImpl::finish()
       size_t count                                = simcall_execution_waitany_for__get__count(simcall);
 
       for (size_t i = 0; i < count; i++) {
-        // Remove the first occurence of simcall:
+        // Remove the first occurrence of simcall:
         auto* exec = execs[i];
         auto j     = boost::range::find(exec->simcalls_, simcall);
         if (j != exec->simcalls_.end())
@@ -310,8 +306,6 @@ ActivityImpl* ExecImpl::migrate(s4u::Host* to)
 /*************
  * Callbacks *
  *************/
-xbt::signal<void(ExecImpl&)> ExecImpl::on_creation;
-xbt::signal<void(ExecImpl const&)> ExecImpl::on_completion;
 xbt::signal<void(ExecImpl const&, s4u::Host*)> ExecImpl::on_migration;
 
 } // namespace activity