Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Only unregister the kill timer once, in maestro context
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 28 Jan 2019 08:16:17 +0000 (09:16 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 28 Jan 2019 08:16:17 +0000 (09:16 +0100)
src/kernel/context/Context.cpp
src/simix/ActorImpl.cpp

index c28bf7b..2b846cf 100644 (file)
@@ -116,6 +116,13 @@ void Context::stop()
   this->iwannadie = false; // don't let the simcall's yield() do a Context::stop(), because that's me
   simgrid::simix::simcall([this] {
     simgrid::s4u::Actor::on_destruction(actor_->iface());
+
+    /* Unregister from the kill timer if any */
+    if (actor_->kill_timer != nullptr) {
+      SIMIX_timer_remove(actor_->kill_timer);
+      actor_->kill_timer = nullptr;
+    }
+
     SIMIX_process_cleanup(actor_);
   });
   this->iwannadie = true;
index 9b0f19b..2e2065b 100644 (file)
@@ -56,12 +56,6 @@ void SIMIX_process_cleanup(smx_actor_t process)
   XBT_DEBUG("Cleanup process %s (%p), waiting synchro %p", process->get_cname(), process,
             process->waiting_synchro.get());
 
-  /* Unregister from the kill timer if any */
-  if (process->kill_timer != nullptr) {
-    SIMIX_timer_remove(process->kill_timer);
-    process->kill_timer = nullptr;
-  }
-
   simix_global->mutex.lock();
 
   simix_global->process_list.erase(process->pid_);