Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more uniformity in kernel
[simgrid.git] / src / kernel / actor / ActorImpl.cpp
index dabf488..b0d47c3 100644 (file)
@@ -372,7 +372,7 @@ activity::ActivityImplPtr ActorImpl::suspend(ActorImpl* issuer)
     return nullptr;
   } else {
     activity::ExecImpl* exec = new activity::ExecImpl();
-    (*exec).set_name("suspend").set_host(host_).start(0.0, 1.0, 0.0);
+    (*exec).set_name("suspend").set_host(host_).set_flops_amount(0.0).start();
     return activity::ExecImplPtr(exec);
   }
 }
@@ -413,11 +413,9 @@ activity::ActivityImplPtr ActorImpl::sleep(double duration)
     throw_exception(std::make_exception_ptr(simgrid::HostFailureException(
         XBT_THROW_POINT, std::string("Host ") + host_->get_cname() + " failed, you cannot sleep there.")));
 
-  return activity::SleepImplPtr(new activity::SleepImpl())
-      ->set_name("sleep")
-      ->set_host(host_)
-      ->set_duration(duration)
-      ->start();
+  activity::SleepImpl* sleep = new activity::SleepImpl();
+  (*sleep).set_name("sleep").set_host(host_).set_duration(duration).start();
+  return activity::SleepImplPtr(sleep);
 }
 
 void ActorImpl::throw_exception(std::exception_ptr e)