Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
allow remote exec: s4u::Exec->setHost()
[simgrid.git] / src / s4u / s4u_exec.cpp
index 1fb2e5b..222ca13 100644 (file)
@@ -15,7 +15,7 @@ namespace s4u {
 
 void Exec::start()
 {
-  pimpl_ = simcall_execution_start(nullptr, flops_amount_, 1 / priority_, 0.);
+  pimpl_ = simcall_execution_start(nullptr, flops_amount_, 1 / priority_, 0., host_);
   state_ = started;
 }
 
@@ -49,6 +49,11 @@ ExecPtr Exec::setPriority(double priority)
   priority_ = priority;
   return this;
 }
+ExecPtr Exec::setHost(Host* host)
+{
+  host_ = host;
+  return this;
+}
 
 double Exec::getRemains()
 {