-void SIMIX_execution_destroy(smx_synchro_t synchro)
-{
- XBT_DEBUG("Destroy synchro %p", synchro);
- simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
-
- if (exec->surf_exec) {
- exec->surf_exec->unref();
- exec->surf_exec = NULL;
- }
- delete exec;
-}
-
-void SIMIX_execution_cancel(smx_synchro_t synchro)
-{
- XBT_DEBUG("Cancel synchro %p", synchro);
- simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
-
- if (exec->surf_exec)
- exec->surf_exec->cancel();
-}
-
-double SIMIX_execution_get_remains(smx_synchro_t synchro)
-{
- double result = 0.0;
- simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
-
- if (synchro->state == SIMIX_RUNNING)
- result = exec->surf_exec->getRemains();
-
- return result;
-}
-
-e_smx_state_t SIMIX_execution_get_state(smx_synchro_t synchro)
-{
- return synchro->state;
-}
-
-void SIMIX_execution_set_priority(smx_synchro_t synchro, double priority)
-{
- simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
- if(exec->surf_exec)
- exec->surf_exec->setPriority(priority);
-}
-
-void SIMIX_execution_set_bound(smx_synchro_t synchro, double bound)
-{
- simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
- if(exec->surf_exec)
- static_cast<simgrid::surf::CpuAction*>(exec->surf_exec)->setBound(bound);
-}
-
-void SIMIX_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask)
-{
- simgrid::simix::Exec *exec = static_cast<simgrid::simix::Exec *>(synchro);
- if(exec->surf_exec) {
- /* just a double check to confirm that this host is the host where this task is running. */
- xbt_assert(exec->host == host);
- static_cast<simgrid::surf::CpuAction*>(exec->surf_exec)->setAffinity(host->pimpl_cpu, mask);
- }
-}
-
-void simcall_HANDLER_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro)