Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
no more need to pass issuer to suspend
[simgrid.git] / src / s4u / s4u_Actor.cpp
index 360cc93..5f75e2a 100644 (file)
@@ -190,7 +190,7 @@ void Actor::suspend()
   auto target = pimpl_;
   s4u::Actor::on_suspend(*this);
   kernel::actor::simcall_blocking<void>([issuer, target]() {
-    target->suspend(issuer);
+    target->suspend();
     if (target != issuer) {
       /* If we are suspending ourselves, then just do not finish the simcall now */
       issuer->simcall_answer();
@@ -441,7 +441,9 @@ Host* get_host()
 
 void suspend()
 {
-  SIMIX_process_self()->iface()->suspend();
+  kernel::actor::ActorImpl* self = SIMIX_process_self();
+  s4u::Actor::on_suspend(*self->ciface());
+  kernel::actor::simcall_blocking<void>([self] { self->suspend(); });
 }
 
 void resume()