Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
properly split init/start for Exec activities
[simgrid.git] / src / s4u / s4u_Actor.cpp
index 3869be9..5e2988b 100644 (file)
@@ -35,7 +35,7 @@ ActorPtr Actor::self()
   if (self_context == nullptr)
     return simgrid::s4u::ActorPtr();
 
-  return self_context->process()->iface();
+  return self_context->get_actor()->iface();
 }
 
 ActorPtr Actor::create(std::string name, s4u::Host* host, std::function<void()> code)
@@ -338,11 +338,7 @@ void parallel_execute(int host_nb, sg_host_t* host_list, double* flops_amount, d
 
 ExecPtr exec_init(double flops_amount)
 {
-  ExecPtr res        = ExecPtr(new Exec());
-  res->host_         = get_host();
-  res->flops_amount_ = flops_amount;
-  res->set_remaining(flops_amount);
-  return res;
+  return ExecPtr(new Exec(get_host(), flops_amount));
 }
 
 ExecPtr exec_async(double flops)