]> AND Public Git Repository - simgrid.git/blobdiff - src/simix/smx_host.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
allow to call s4u::Exec->setHost() after its start, to migrate it
[simgrid.git] / src / simix / smx_host.cpp
index 692e828540c2b60a295478718a82e982fa5b4d74..ed49843c8aad9310d28972f544ca89510fefe42c 100644 (file)
@@ -145,13 +145,6 @@ void SIMIX_host_autorestart(sg_host_t host)
   process_list.clear();
 }
 
-boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
-simcall_HANDLER_execution_start(smx_simcall_t simcall, const char* name, double flops_amount, double priority,
-                                double bound, sg_host_t host)
-{
-  return SIMIX_execution_start(name, flops_amount, priority, bound, host);
-}
-
 boost::intrusive_ptr<simgrid::kernel::activity::ExecImpl>
 SIMIX_execution_start(const char* name, double flops_amount, double priority, double bound, sg_host_t host)
 {
@@ -172,6 +165,7 @@ SIMIX_execution_start(const char* name, double flops_amount, double priority, do
   }
 
   XBT_DEBUG("Create execute synchro %p: %s", exec.get(), exec->name.c_str());
+  simgrid::kernel::activity::ExecImpl::onCreation(exec);
 
   return exec;
 }
@@ -211,8 +205,6 @@ SIMIX_execution_parallel_start(const char* name, int host_nb, sg_host_t* host_li
 
 void simcall_HANDLER_execution_wait(smx_simcall_t simcall, smx_activity_t synchro)
 {
-  simgrid::kernel::activity::ExecImplPtr exec =
-      boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(synchro);
   XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro.get(), (int)synchro->state);
 
   /* Associate this simcall to the synchro */
@@ -233,9 +225,6 @@ void simcall_HANDLER_execution_wait(smx_simcall_t simcall, smx_activity_t synchr
 
 void simcall_HANDLER_execution_test(smx_simcall_t simcall, smx_activity_t synchro)
 {
-  simgrid::kernel::activity::ExecImplPtr exec =
-      boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(synchro);
-
   simcall_execution_test__set__result(simcall, (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING));
   if (simcall_execution_test__get__result(simcall)) {
     synchro->simcalls.push_back(simcall);