-void SIMIX_process_execution_destroy(smx_synchro_t synchro){
- XBT_DEBUG("Destroy synchro %p", synchro);
-
- if (synchro->execution.surf_exec) {
- synchro->execution.surf_exec->unref();
- synchro->execution.surf_exec = NULL;
- }
- xbt_free(synchro->name);
- xbt_mallocator_release(simix_global->synchro_mallocator, synchro);
-}
-
-void SIMIX_process_execution_cancel(smx_synchro_t synchro){
- XBT_DEBUG("Cancel synchro %p", synchro);
-
- if (synchro->execution.surf_exec)
- synchro->execution.surf_exec->cancel();
-}
-
-double SIMIX_process_execution_get_remains(smx_synchro_t synchro){
- double result = 0.0;
-
- if (synchro->state == SIMIX_RUNNING)
- result = surf_action_get_remains(synchro->execution.surf_exec);
-
- return result;
-}
-
-e_smx_state_t SIMIX_process_execution_get_state(smx_synchro_t synchro){
- return synchro->state;
-}
-
-void SIMIX_process_execution_set_priority(smx_synchro_t synchro, double priority){
-
- if(synchro->execution.surf_exec)
- synchro->execution.surf_exec->setPriority(priority);
-}
-
-void SIMIX_process_execution_set_bound(smx_synchro_t synchro, double bound){
-
- if(synchro->execution.surf_exec)
- static_cast<simgrid::surf::CpuAction*>(synchro->execution.surf_exec)
- ->setBound(bound);
-}
-
-void SIMIX_process_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask){
- xbt_assert(synchro->type == SIMIX_SYNC_EXECUTE);
-
- if (synchro->execution.surf_exec) {
- /* just a double check to confirm that this host is the host where this task is running. */
- xbt_assert(synchro->execution.host == host);
- static_cast<simgrid::surf::CpuAction*>(synchro->execution.surf_exec)
- ->setAffinity(host->p_cpu, mask);
- }
-}
-
-void simcall_HANDLER_process_execution_wait(smx_simcall_t simcall, smx_synchro_t synchro){
-
- XBT_DEBUG("Wait for execution of synchro %p, state %d", synchro, (int)synchro->state);
+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);