From a69dbf9a2522d0ccde10350b49c5866ed9d731bd Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 2 Nov 2014 01:18:26 +0100 Subject: [PATCH] rename all SIMIX_pre_* to simcall_HANDLER_* This is consistant with simcall_BODY_*, and more explicit --- src/mc/mc_checkpoint.c | 2 +- src/mc/mc_compare.cpp | 2 +- src/mc/mc_global.c | 2 +- src/mc/mc_interface.h | 6 +- src/simix/popping_bodies.c | 246 ++++++++++++++++---------------- src/simix/popping_generated.c | 246 ++++++++++++++++---------------- src/simix/popping_private.h | 2 +- src/simix/simcalls.py | 16 +-- src/simix/smx_global.c | 2 +- src/simix/smx_host.c | 62 ++++---- src/simix/smx_host_private.h | 92 ++++++------ src/simix/smx_io.c | 32 ++--- src/simix/smx_io_private.h | 34 +++-- src/simix/smx_network.c | 54 +++---- src/simix/smx_network_private.h | 50 +++---- src/simix/smx_process.c | 48 +++---- src/simix/smx_process_private.h | 46 +++--- src/simix/smx_synchro.c | 36 ++--- src/simix/smx_synchro_private.h | 38 ++--- src/simix/smx_vm.c | 28 ++-- 20 files changed, 521 insertions(+), 523 deletions(-) diff --git a/src/mc/mc_checkpoint.c b/src/mc/mc_checkpoint.c index 3bda8f70cb..6920bf2b97 100644 --- a/src/mc/mc_checkpoint.c +++ b/src/mc/mc_checkpoint.c @@ -657,7 +657,7 @@ void MC_restore_snapshot(mc_snapshot_t snapshot) } } -mc_snapshot_t SIMIX_pre_mc_snapshot(smx_simcall_t simcall) +mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall) { return MC_take_snapshot(1); } diff --git a/src/mc/mc_compare.cpp b/src/mc/mc_compare.cpp index 1891f31d8a..1f7814aa63 100644 --- a/src/mc/mc_compare.cpp +++ b/src/mc/mc_compare.cpp @@ -674,7 +674,7 @@ void print_comparison_times() /**************************** MC snapshot compare simcall **************************/ /***********************************************************************************/ -int SIMIX_pre_mc_compare_snapshots(smx_simcall_t simcall, +int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2) { return snapshot_compare(s1, s2); diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index 6b8d8b04af..21810051ad 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -322,7 +322,7 @@ void MC_exit(void) //xbt_abort(); } -int SIMIX_pre_mc_random(smx_simcall_t simcall, int min, int max) +int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max) { return simcall->mc_value; diff --git a/src/mc/mc_interface.h b/src/mc/mc_interface.h index 0105f37e92..c2e8042b44 100644 --- a/src/mc/mc_interface.h +++ b/src/mc/mc_interface.h @@ -14,9 +14,9 @@ SG_BEGIN_DECL() typedef struct s_mc_snapshot *mc_snapshot_t; /* These are the MC-specific simcalls, that smx_user needs to see */ -mc_snapshot_t SIMIX_pre_mc_snapshot(smx_simcall_t simcall); -int SIMIX_pre_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2); -int SIMIX_pre_mc_random(smx_simcall_t simcall, int min, int max); +mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall); +int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2); +int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max); SG_END_DECL() diff --git a/src/simix/popping_bodies.c b/src/simix/popping_bodies.c index 6c17039a4e..dc64375fea 100644 --- a/src/simix/popping_bodies.c +++ b/src/simix/popping_bodies.c @@ -21,7 +21,7 @@ inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_by_name(&self->simcall, name); + if (0) simcall_HANDLER_host_get_by_name(&self->simcall, name); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_BY_NAME; @@ -42,7 +42,7 @@ inline static const char* simcall_BODY_host_get_name(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_name(&self->simcall, host); + if (0) simcall_HANDLER_host_get_name(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_NAME; @@ -63,7 +63,7 @@ inline static void simcall_BODY_host_on(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_on(&self->simcall, host); + if (0) simcall_HANDLER_host_on(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_ON; @@ -84,7 +84,7 @@ inline static void simcall_BODY_host_off(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_off(&self->simcall, host); + if (0) simcall_HANDLER_host_off(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_OFF; @@ -105,7 +105,7 @@ inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_properties(&self->simcall, host); + if (0) simcall_HANDLER_host_get_properties(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_PROPERTIES; @@ -126,7 +126,7 @@ inline static int simcall_BODY_host_get_core(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_core(&self->simcall, host); + if (0) simcall_HANDLER_host_get_core(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_CORE; @@ -147,7 +147,7 @@ inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_process_list(&self->simcall, host); + if (0) simcall_HANDLER_host_get_process_list(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST; @@ -168,7 +168,7 @@ inline static double simcall_BODY_host_get_speed(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_speed(&self->simcall, host); + if (0) simcall_HANDLER_host_get_speed(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_SPEED; @@ -189,7 +189,7 @@ inline static double simcall_BODY_host_get_available_speed(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_available_speed(&self->simcall, host); + if (0) simcall_HANDLER_host_get_available_speed(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_AVAILABLE_SPEED; @@ -210,7 +210,7 @@ inline static int simcall_BODY_host_get_state(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_state(&self->simcall, host); + if (0) simcall_HANDLER_host_get_state(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_STATE; @@ -231,7 +231,7 @@ inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_current_power_peak(&self->simcall, host); + if (0) simcall_HANDLER_host_get_current_power_peak(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK; @@ -252,7 +252,7 @@ inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int ps smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_power_peak_at(&self->simcall, host, pstate_index); + if (0) simcall_HANDLER_host_get_power_peak_at(&self->simcall, host, pstate_index); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_POWER_PEAK_AT; @@ -274,7 +274,7 @@ inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_nb_pstates(&self->simcall, host); + if (0) simcall_HANDLER_host_get_nb_pstates(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES; @@ -295,7 +295,7 @@ inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int psta smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_set_power_peak_at(&self->simcall, host, pstate_index); + if (0) simcall_HANDLER_host_set_power_peak_at(&self->simcall, host, pstate_index); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_SET_POWER_PEAK_AT; @@ -317,7 +317,7 @@ inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_consumed_energy(&self->simcall, host); + if (0) simcall_HANDLER_host_get_consumed_energy(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_CONSUMED_ENERGY; @@ -338,7 +338,7 @@ inline static smx_action_t simcall_BODY_host_execute(const char* name, smx_host_ smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_execute(&self->simcall, name, host, computation_amount, priority, bound, affinity_mask); + if (0) simcall_HANDLER_host_execute(&self->simcall, name, host, computation_amount, priority, bound, affinity_mask); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_EXECUTE; @@ -364,7 +364,7 @@ inline static smx_action_t simcall_BODY_host_parallel_execute(const char* name, smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_parallel_execute(&self->simcall, name, host_nb, host_list, computation_amount, communication_amount, amount, rate); + if (0) simcall_HANDLER_host_parallel_execute(&self->simcall, name, host_nb, host_list, computation_amount, communication_amount, amount, rate); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE; @@ -391,7 +391,7 @@ inline static void simcall_BODY_host_execution_destroy(smx_action_t execution) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_execution_destroy(&self->simcall, execution); + if (0) simcall_HANDLER_host_execution_destroy(&self->simcall, execution); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_EXECUTION_DESTROY; @@ -412,7 +412,7 @@ inline static void simcall_BODY_host_execution_cancel(smx_action_t execution) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_execution_cancel(&self->simcall, execution); + if (0) simcall_HANDLER_host_execution_cancel(&self->simcall, execution); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_EXECUTION_CANCEL; @@ -433,7 +433,7 @@ inline static double simcall_BODY_host_execution_get_remains(smx_action_t execut smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_execution_get_remains(&self->simcall, execution); + if (0) simcall_HANDLER_host_execution_get_remains(&self->simcall, execution); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_EXECUTION_GET_REMAINS; @@ -454,7 +454,7 @@ inline static int simcall_BODY_host_execution_get_state(smx_action_t execution) smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_execution_get_state(&self->simcall, execution); + if (0) simcall_HANDLER_host_execution_get_state(&self->simcall, execution); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_EXECUTION_GET_STATE; @@ -475,7 +475,7 @@ inline static void simcall_BODY_host_execution_set_priority(smx_action_t executi smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_execution_set_priority(&self->simcall, execution, priority); + if (0) simcall_HANDLER_host_execution_set_priority(&self->simcall, execution, priority); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_EXECUTION_SET_PRIORITY; @@ -497,7 +497,7 @@ inline static void simcall_BODY_host_execution_set_bound(smx_action_t execution, smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_execution_set_bound(&self->simcall, execution, bound); + if (0) simcall_HANDLER_host_execution_set_bound(&self->simcall, execution, bound); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_EXECUTION_SET_BOUND; @@ -519,7 +519,7 @@ inline static void simcall_BODY_host_execution_set_affinity(smx_action_t executi smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_execution_set_affinity(&self->simcall, execution, ws, mask); + if (0) simcall_HANDLER_host_execution_set_affinity(&self->simcall, execution, ws, mask); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_EXECUTION_SET_AFFINITY; @@ -542,7 +542,7 @@ inline static int simcall_BODY_host_execution_wait(smx_action_t execution) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_execution_wait(&self->simcall, execution); + if (0) simcall_HANDLER_host_execution_wait(&self->simcall, execution); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_EXECUTION_WAIT; @@ -563,7 +563,7 @@ inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t h smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_mounted_storage_list(&self->simcall, host); + if (0) simcall_HANDLER_host_get_mounted_storage_list(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST; @@ -584,7 +584,7 @@ inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_attached_storage_list(&self->simcall, host); + if (0) simcall_HANDLER_host_get_attached_storage_list(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST; @@ -605,7 +605,7 @@ inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t p smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_get_params(&self->simcall, ind_vm, params); + if (0) simcall_HANDLER_host_get_params(&self->simcall, ind_vm, params); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_GET_PARAMS; @@ -627,7 +627,7 @@ inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t p smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_host_set_params(&self->simcall, ind_vm, params); + if (0) simcall_HANDLER_host_set_params(&self->simcall, ind_vm, params); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_HOST_SET_PARAMS; @@ -649,7 +649,7 @@ inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_create(&self->simcall, name, ind_pm); + if (0) simcall_HANDLER_vm_create(&self->simcall, name, ind_pm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_CREATE; @@ -671,7 +671,7 @@ inline static void simcall_BODY_vm_start(smx_host_t ind_vm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_start(&self->simcall, ind_vm); + if (0) simcall_HANDLER_vm_start(&self->simcall, ind_vm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_START; @@ -692,7 +692,7 @@ inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_get_state(&self->simcall, ind_vm); + if (0) simcall_HANDLER_vm_get_state(&self->simcall, ind_vm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_GET_STATE; @@ -713,7 +713,7 @@ inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_migrate(&self->simcall, ind_vm, ind_dst_pm); + if (0) simcall_HANDLER_vm_migrate(&self->simcall, ind_vm, ind_dst_pm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_MIGRATE; @@ -735,7 +735,7 @@ inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_get_pm(&self->simcall, ind_vm); + if (0) simcall_HANDLER_vm_get_pm(&self->simcall, ind_vm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_GET_PM; @@ -756,7 +756,7 @@ inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_set_bound(&self->simcall, ind_vm, bound); + if (0) simcall_HANDLER_vm_set_bound(&self->simcall, ind_vm, bound); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_SET_BOUND; @@ -778,7 +778,7 @@ inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t in smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_set_affinity(&self->simcall, ind_vm, ind_pm, mask); + if (0) simcall_HANDLER_vm_set_affinity(&self->simcall, ind_vm, ind_pm, mask); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_SET_AFFINITY; @@ -801,7 +801,7 @@ inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_destroy(&self->simcall, ind_vm); + if (0) simcall_HANDLER_vm_destroy(&self->simcall, ind_vm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_DESTROY; @@ -822,7 +822,7 @@ inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_suspend(&self->simcall, ind_vm); + if (0) simcall_HANDLER_vm_suspend(&self->simcall, ind_vm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_SUSPEND; @@ -843,7 +843,7 @@ inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_resume(&self->simcall, ind_vm); + if (0) simcall_HANDLER_vm_resume(&self->simcall, ind_vm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_RESUME; @@ -864,7 +864,7 @@ inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_shutdown(&self->simcall, ind_vm); + if (0) simcall_HANDLER_vm_shutdown(&self->simcall, ind_vm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_SHUTDOWN; @@ -885,7 +885,7 @@ inline static void simcall_BODY_vm_save(smx_host_t ind_vm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_save(&self->simcall, ind_vm); + if (0) simcall_HANDLER_vm_save(&self->simcall, ind_vm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_SAVE; @@ -906,7 +906,7 @@ inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_vm_restore(&self->simcall, ind_vm); + if (0) simcall_HANDLER_vm_restore(&self->simcall, ind_vm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_VM_RESTORE; @@ -927,7 +927,7 @@ inline static void simcall_BODY_process_create(smx_process_t* process, const cha smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_create(&self->simcall, process, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart); + if (0) simcall_HANDLER_process_create(&self->simcall, process, name, code, data, hostname, kill_time, argc, argv, properties, auto_restart); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_CREATE; @@ -957,7 +957,7 @@ inline static void simcall_BODY_process_kill(smx_process_t process) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_kill(&self->simcall, process); + if (0) simcall_HANDLER_process_kill(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_KILL; @@ -978,7 +978,7 @@ inline static void simcall_BODY_process_killall(int reset_pid) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_killall(&self->simcall, reset_pid); + if (0) simcall_HANDLER_process_killall(&self->simcall, reset_pid); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_KILLALL; @@ -999,7 +999,7 @@ inline static void simcall_BODY_process_cleanup(smx_process_t process) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_cleanup(&self->simcall, process); + if (0) simcall_HANDLER_process_cleanup(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_CLEANUP; @@ -1020,7 +1020,7 @@ inline static void simcall_BODY_process_change_host(smx_process_t process, smx_h smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_change_host(&self->simcall, process, dest); + if (0) simcall_HANDLER_process_change_host(&self->simcall, process, dest); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST; @@ -1042,7 +1042,7 @@ inline static void simcall_BODY_process_suspend(smx_process_t process) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_suspend(&self->simcall, process); + if (0) simcall_HANDLER_process_suspend(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_SUSPEND; @@ -1063,7 +1063,7 @@ inline static void simcall_BODY_process_resume(smx_process_t process) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_resume(&self->simcall, process); + if (0) simcall_HANDLER_process_resume(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_RESUME; @@ -1084,7 +1084,7 @@ inline static int simcall_BODY_process_count() { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_count(&self->simcall); + if (0) simcall_HANDLER_process_count(&self->simcall); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_COUNT; @@ -1105,7 +1105,7 @@ inline static int simcall_BODY_process_get_PID(smx_process_t process) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_get_PID(&self->simcall, process); + if (0) simcall_HANDLER_process_get_PID(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_GET_PID; @@ -1126,7 +1126,7 @@ inline static int simcall_BODY_process_get_PPID(smx_process_t process) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_get_PPID(&self->simcall, process); + if (0) simcall_HANDLER_process_get_PPID(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_GET_PPID; @@ -1147,7 +1147,7 @@ inline static void* simcall_BODY_process_get_data(smx_process_t process) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_get_data(&self->simcall, process); + if (0) simcall_HANDLER_process_get_data(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_GET_DATA; @@ -1168,7 +1168,7 @@ inline static void simcall_BODY_process_set_data(smx_process_t process, void* da smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_set_data(&self->simcall, process, data); + if (0) simcall_HANDLER_process_set_data(&self->simcall, process, data); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_SET_DATA; @@ -1190,7 +1190,7 @@ inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_get_host(&self->simcall, process); + if (0) simcall_HANDLER_process_get_host(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_GET_HOST; @@ -1211,7 +1211,7 @@ inline static const char* simcall_BODY_process_get_name(smx_process_t process) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_get_name(&self->simcall, process); + if (0) simcall_HANDLER_process_get_name(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_GET_NAME; @@ -1232,7 +1232,7 @@ inline static int simcall_BODY_process_is_suspended(smx_process_t process) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_is_suspended(&self->simcall, process); + if (0) simcall_HANDLER_process_is_suspended(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED; @@ -1253,7 +1253,7 @@ inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t proce smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_get_properties(&self->simcall, process); + if (0) simcall_HANDLER_process_get_properties(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_GET_PROPERTIES; @@ -1274,7 +1274,7 @@ inline static int simcall_BODY_process_join(smx_process_t process, double timeou smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_join(&self->simcall, process, timeout); + if (0) simcall_HANDLER_process_join(&self->simcall, process, timeout); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_JOIN; @@ -1296,7 +1296,7 @@ inline static int simcall_BODY_process_sleep(double duration) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_sleep(&self->simcall, duration); + if (0) simcall_HANDLER_process_sleep(&self->simcall, duration); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_SLEEP; @@ -1317,7 +1317,7 @@ inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvo smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_on_exit(&self->simcall, process, fun, data); + if (0) simcall_HANDLER_process_on_exit(&self->simcall, process, fun, data); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_ON_EXIT; @@ -1340,7 +1340,7 @@ inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_auto_restart_set(&self->simcall, process, auto_restart); + if (0) simcall_HANDLER_process_auto_restart_set(&self->simcall, process, auto_restart); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET; @@ -1362,7 +1362,7 @@ inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_process_restart(&self->simcall, process); + if (0) simcall_HANDLER_process_restart(&self->simcall, process); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_PROCESS_RESTART; @@ -1383,7 +1383,7 @@ inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_rdv_create(&self->simcall, name); + if (0) simcall_HANDLER_rdv_create(&self->simcall, name); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_RDV_CREATE; @@ -1404,7 +1404,7 @@ inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_rdv_destroy(&self->simcall, rdv); + if (0) simcall_HANDLER_rdv_destroy(&self->simcall, rdv); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_RDV_DESTROY; @@ -1425,7 +1425,7 @@ inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, sm smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_rdv_comm_count_by_host(&self->simcall, rdv, host); + if (0) simcall_HANDLER_rdv_comm_count_by_host(&self->simcall, rdv, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST; @@ -1447,7 +1447,7 @@ inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_rdv_get_head(&self->simcall, rdv); + if (0) simcall_HANDLER_rdv_get_head(&self->simcall, rdv); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_RDV_GET_HEAD; @@ -1468,7 +1468,7 @@ inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t re smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_rdv_set_receiver(&self->simcall, rdv, receiver); + if (0) simcall_HANDLER_rdv_set_receiver(&self->simcall, rdv, receiver); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_RDV_SET_RECEIVER; @@ -1490,7 +1490,7 @@ inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_rdv_get_receiver(&self->simcall, rdv); + if (0) simcall_HANDLER_rdv_get_receiver(&self->simcall, rdv); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_RDV_GET_RECEIVER; @@ -1511,7 +1511,7 @@ inline static smx_action_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data); + if (0) simcall_HANDLER_comm_iprobe(&self->simcall, rdv, type, src, tag, match_fun, data); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_IPROBE; @@ -1537,7 +1537,7 @@ inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, doub smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_send(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout); + if (0) simcall_HANDLER_comm_send(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_SEND; @@ -1567,7 +1567,7 @@ inline static smx_action_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_isend(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached); + if (0) simcall_HANDLER_comm_isend(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_ISEND; @@ -1598,7 +1598,7 @@ inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_recv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate); + if (0) simcall_HANDLER_comm_recv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_RECV; @@ -1626,7 +1626,7 @@ inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_irecv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate); + if (0) simcall_HANDLER_comm_irecv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_IRECV; @@ -1653,7 +1653,7 @@ inline static void simcall_BODY_comm_cancel(smx_action_t comm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_cancel(&self->simcall, comm); + if (0) simcall_HANDLER_comm_cancel(&self->simcall, comm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_CANCEL; @@ -1674,7 +1674,7 @@ inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_waitany(&self->simcall, comms); + if (0) simcall_HANDLER_comm_waitany(&self->simcall, comms); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_WAITANY; @@ -1695,7 +1695,7 @@ inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_wait(&self->simcall, comm, timeout); + if (0) simcall_HANDLER_comm_wait(&self->simcall, comm, timeout); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_WAIT; @@ -1717,7 +1717,7 @@ inline static int simcall_BODY_comm_test(smx_action_t comm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_test(&self->simcall, comm); + if (0) simcall_HANDLER_comm_test(&self->simcall, comm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_TEST; @@ -1738,7 +1738,7 @@ inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_testany(&self->simcall, comms); + if (0) simcall_HANDLER_comm_testany(&self->simcall, comms); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_TESTANY; @@ -1759,7 +1759,7 @@ inline static double simcall_BODY_comm_get_remains(smx_action_t comm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_get_remains(&self->simcall, comm); + if (0) simcall_HANDLER_comm_get_remains(&self->simcall, comm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_GET_REMAINS; @@ -1780,7 +1780,7 @@ inline static int simcall_BODY_comm_get_state(smx_action_t comm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_get_state(&self->simcall, comm); + if (0) simcall_HANDLER_comm_get_state(&self->simcall, comm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_GET_STATE; @@ -1801,7 +1801,7 @@ inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_get_src_data(&self->simcall, comm); + if (0) simcall_HANDLER_comm_get_src_data(&self->simcall, comm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_GET_SRC_DATA; @@ -1822,7 +1822,7 @@ inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_get_dst_data(&self->simcall, comm); + if (0) simcall_HANDLER_comm_get_dst_data(&self->simcall, comm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_GET_DST_DATA; @@ -1843,7 +1843,7 @@ inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_get_src_proc(&self->simcall, comm); + if (0) simcall_HANDLER_comm_get_src_proc(&self->simcall, comm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_GET_SRC_PROC; @@ -1864,7 +1864,7 @@ inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_get_dst_proc(&self->simcall, comm); + if (0) simcall_HANDLER_comm_get_dst_proc(&self->simcall, comm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_GET_DST_PROC; @@ -1885,7 +1885,7 @@ inline static smx_mutex_t simcall_BODY_mutex_init() { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_mutex_init(&self->simcall); + if (0) simcall_HANDLER_mutex_init(&self->simcall); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_MUTEX_INIT; @@ -1906,7 +1906,7 @@ inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_mutex_destroy(&self->simcall, mutex); + if (0) simcall_HANDLER_mutex_destroy(&self->simcall, mutex); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_MUTEX_DESTROY; @@ -1927,7 +1927,7 @@ inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_mutex_lock(&self->simcall, mutex); + if (0) simcall_HANDLER_mutex_lock(&self->simcall, mutex); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_MUTEX_LOCK; @@ -1948,7 +1948,7 @@ inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_mutex_trylock(&self->simcall, mutex); + if (0) simcall_HANDLER_mutex_trylock(&self->simcall, mutex); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_MUTEX_TRYLOCK; @@ -1969,7 +1969,7 @@ inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_mutex_unlock(&self->simcall, mutex); + if (0) simcall_HANDLER_mutex_unlock(&self->simcall, mutex); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_MUTEX_UNLOCK; @@ -1990,7 +1990,7 @@ inline static smx_cond_t simcall_BODY_cond_init() { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_cond_init(&self->simcall); + if (0) simcall_HANDLER_cond_init(&self->simcall); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COND_INIT; @@ -2011,7 +2011,7 @@ inline static void simcall_BODY_cond_destroy(smx_cond_t cond) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_cond_destroy(&self->simcall, cond); + if (0) simcall_HANDLER_cond_destroy(&self->simcall, cond); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COND_DESTROY; @@ -2032,7 +2032,7 @@ inline static void simcall_BODY_cond_signal(smx_cond_t cond) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_cond_signal(&self->simcall, cond); + if (0) simcall_HANDLER_cond_signal(&self->simcall, cond); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COND_SIGNAL; @@ -2053,7 +2053,7 @@ inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_cond_wait(&self->simcall, cond, mutex); + if (0) simcall_HANDLER_cond_wait(&self->simcall, cond, mutex); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COND_WAIT; @@ -2075,7 +2075,7 @@ inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t m smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_cond_wait_timeout(&self->simcall, cond, mutex, timeout); + if (0) simcall_HANDLER_cond_wait_timeout(&self->simcall, cond, mutex, timeout); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COND_WAIT_TIMEOUT; @@ -2098,7 +2098,7 @@ inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_cond_broadcast(&self->simcall, cond); + if (0) simcall_HANDLER_cond_broadcast(&self->simcall, cond); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COND_BROADCAST; @@ -2119,7 +2119,7 @@ inline static smx_sem_t simcall_BODY_sem_init(int capacity) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_sem_init(&self->simcall, capacity); + if (0) simcall_HANDLER_sem_init(&self->simcall, capacity); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_SEM_INIT; @@ -2140,7 +2140,7 @@ inline static void simcall_BODY_sem_destroy(smx_sem_t sem) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_sem_destroy(&self->simcall, sem); + if (0) simcall_HANDLER_sem_destroy(&self->simcall, sem); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_SEM_DESTROY; @@ -2161,7 +2161,7 @@ inline static void simcall_BODY_sem_release(smx_sem_t sem) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_sem_release(&self->simcall, sem); + if (0) simcall_HANDLER_sem_release(&self->simcall, sem); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_SEM_RELEASE; @@ -2182,7 +2182,7 @@ inline static int simcall_BODY_sem_would_block(smx_sem_t sem) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_sem_would_block(&self->simcall, sem); + if (0) simcall_HANDLER_sem_would_block(&self->simcall, sem); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_SEM_WOULD_BLOCK; @@ -2203,7 +2203,7 @@ inline static void simcall_BODY_sem_acquire(smx_sem_t sem) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_sem_acquire(&self->simcall, sem); + if (0) simcall_HANDLER_sem_acquire(&self->simcall, sem); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_SEM_ACQUIRE; @@ -2224,7 +2224,7 @@ inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeou smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_sem_acquire_timeout(&self->simcall, sem, timeout); + if (0) simcall_HANDLER_sem_acquire_timeout(&self->simcall, sem, timeout); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_SEM_ACQUIRE_TIMEOUT; @@ -2246,7 +2246,7 @@ inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_sem_get_capacity(&self->simcall, sem); + if (0) simcall_HANDLER_sem_get_capacity(&self->simcall, sem); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_SEM_GET_CAPACITY; @@ -2267,7 +2267,7 @@ inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sm smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_file_read(&self->simcall, fd, size, host); + if (0) simcall_HANDLER_file_read(&self->simcall, fd, size, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_FILE_READ; @@ -2290,7 +2290,7 @@ inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, s smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_file_write(&self->simcall, fd, size, host); + if (0) simcall_HANDLER_file_write(&self->simcall, fd, size, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_FILE_WRITE; @@ -2313,7 +2313,7 @@ inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_file_open(&self->simcall, fullpath, host); + if (0) simcall_HANDLER_file_open(&self->simcall, fullpath, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_FILE_OPEN; @@ -2335,7 +2335,7 @@ inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_file_close(&self->simcall, fd, host); + if (0) simcall_HANDLER_file_close(&self->simcall, fd, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_FILE_CLOSE; @@ -2357,7 +2357,7 @@ inline static int simcall_BODY_file_unlink(smx_file_t fd, smx_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_file_unlink(&self->simcall, fd, host); + if (0) simcall_HANDLER_file_unlink(&self->simcall, fd, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_FILE_UNLINK; @@ -2379,7 +2379,7 @@ inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_file_get_size(&self->simcall, fd); + if (0) simcall_HANDLER_file_get_size(&self->simcall, fd); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_FILE_GET_SIZE; @@ -2400,7 +2400,7 @@ inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_file_tell(&self->simcall, fd); + if (0) simcall_HANDLER_file_tell(&self->simcall, fd); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_FILE_TELL; @@ -2421,7 +2421,7 @@ inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_file_seek(&self->simcall, fd, offset, origin); + if (0) simcall_HANDLER_file_seek(&self->simcall, fd, offset, origin); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_FILE_SEEK; @@ -2444,7 +2444,7 @@ inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_file_get_info(&self->simcall, fd); + if (0) simcall_HANDLER_file_get_info(&self->simcall, fd); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_FILE_GET_INFO; @@ -2465,7 +2465,7 @@ inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_file_move(&self->simcall, fd, fullpath); + if (0) simcall_HANDLER_file_move(&self->simcall, fd, fullpath); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_FILE_MOVE; @@ -2487,7 +2487,7 @@ inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_storage_get_free_size(&self->simcall, storage); + if (0) simcall_HANDLER_storage_get_free_size(&self->simcall, storage); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE; @@ -2508,7 +2508,7 @@ inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_storage_get_used_size(&self->simcall, name); + if (0) simcall_HANDLER_storage_get_used_size(&self->simcall, name); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE; @@ -2529,7 +2529,7 @@ inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t stora smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_storage_get_properties(&self->simcall, storage); + if (0) simcall_HANDLER_storage_get_properties(&self->simcall, storage); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_STORAGE_GET_PROPERTIES; @@ -2550,7 +2550,7 @@ inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_storage_get_content(&self->simcall, storage); + if (0) simcall_HANDLER_storage_get_content(&self->simcall, storage); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_STORAGE_GET_CONTENT; @@ -2571,7 +2571,7 @@ inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_asr_get_properties(&self->simcall, name); + if (0) simcall_HANDLER_asr_get_properties(&self->simcall, name); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_ASR_GET_PROPERTIES; @@ -2593,7 +2593,7 @@ inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_comm_is_latency_bounded(&self->simcall, comm); + if (0) simcall_HANDLER_comm_is_latency_bounded(&self->simcall, comm); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED; @@ -2617,7 +2617,7 @@ inline static void simcall_BODY_set_category(smx_action_t action, const char* ca smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_set_category(&self->simcall, action, category); + if (0) simcall_HANDLER_set_category(&self->simcall, action, category); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_SET_CATEGORY; @@ -2642,7 +2642,7 @@ inline static void* simcall_BODY_mc_snapshot() { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_mc_snapshot(&self->simcall); + if (0) simcall_HANDLER_mc_snapshot(&self->simcall); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_MC_SNAPSHOT; @@ -2663,7 +2663,7 @@ inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_mc_compare_snapshots(&self->simcall, s1, s2); + if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS; @@ -2685,7 +2685,7 @@ inline static int simcall_BODY_mc_random(int min, int max) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_mc_random(&self->simcall, min, max); + if (0) simcall_HANDLER_mc_random(&self->simcall, min, max); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_MC_RANDOM; diff --git a/src/simix/popping_generated.c b/src/simix/popping_generated.c index d2afb25eae..8a7cdbce39 100644 --- a/src/simix/popping_generated.c +++ b/src/simix/popping_generated.c @@ -168,579 +168,579 @@ void SIMIX_simcall_handle(smx_simcall_t simcall, int value) { return; switch (simcall->call) { case SIMCALL_HOST_GET_BY_NAME: - simcall->result.dp = SIMIX_pre_host_get_by_name(simcall , simcall->args[0].cc); + simcall->result.dp = simcall_HANDLER_host_get_by_name(simcall , simcall->args[0].cc); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_NAME: - simcall->result.cc = SIMIX_pre_host_get_name(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.cc = simcall_HANDLER_host_get_name(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_ON: - SIMIX_pre_host_on(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_host_on(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_OFF: - SIMIX_pre_host_off(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_host_off(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_PROPERTIES: - simcall->result.dp = SIMIX_pre_host_get_properties(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_host_get_properties(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_CORE: - simcall->result.i = SIMIX_pre_host_get_core(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_host_get_core(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_PROCESS_LIST: - simcall->result.dp = SIMIX_pre_host_get_process_list(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_host_get_process_list(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_SPEED: - simcall->result.d = SIMIX_pre_host_get_speed(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.d = simcall_HANDLER_host_get_speed(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_AVAILABLE_SPEED: - simcall->result.d = SIMIX_pre_host_get_available_speed(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.d = simcall_HANDLER_host_get_available_speed(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_STATE: - simcall->result.i = SIMIX_pre_host_get_state(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_host_get_state(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_CURRENT_POWER_PEAK: - simcall->result.d = SIMIX_pre_host_get_current_power_peak(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.d = simcall_HANDLER_host_get_current_power_peak(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_POWER_PEAK_AT: - simcall->result.d = SIMIX_pre_host_get_power_peak_at(simcall , (smx_host_t) simcall->args[0].dp, simcall->args[1].i); + simcall->result.d = simcall_HANDLER_host_get_power_peak_at(simcall , (smx_host_t) simcall->args[0].dp, simcall->args[1].i); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_NB_PSTATES: - simcall->result.i = SIMIX_pre_host_get_nb_pstates(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_host_get_nb_pstates(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_SET_POWER_PEAK_AT: - SIMIX_pre_host_set_power_peak_at(simcall , (smx_host_t) simcall->args[0].dp, simcall->args[1].i); + simcall_HANDLER_host_set_power_peak_at(simcall , (smx_host_t) simcall->args[0].dp, simcall->args[1].i); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_CONSUMED_ENERGY: - simcall->result.d = SIMIX_pre_host_get_consumed_energy(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.d = simcall_HANDLER_host_get_consumed_energy(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_EXECUTE: - simcall->result.dp = SIMIX_pre_host_execute(simcall , simcall->args[0].cc, (smx_host_t) simcall->args[1].dp, simcall->args[2].d, simcall->args[3].d, simcall->args[4].d, simcall->args[5].ul); + simcall->result.dp = simcall_HANDLER_host_execute(simcall , simcall->args[0].cc, (smx_host_t) simcall->args[1].dp, simcall->args[2].d, simcall->args[3].d, simcall->args[4].d, simcall->args[5].ul); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_PARALLEL_EXECUTE: - simcall->result.dp = SIMIX_pre_host_parallel_execute(simcall , simcall->args[0].cc, simcall->args[1].i, (smx_host_t*) simcall->args[2].dp, (double*) simcall->args[3].dp, (double*) simcall->args[4].dp, simcall->args[5].d, simcall->args[6].d); + simcall->result.dp = simcall_HANDLER_host_parallel_execute(simcall , simcall->args[0].cc, simcall->args[1].i, (smx_host_t*) simcall->args[2].dp, (double*) simcall->args[3].dp, (double*) simcall->args[4].dp, simcall->args[5].d, simcall->args[6].d); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_EXECUTION_DESTROY: - SIMIX_pre_host_execution_destroy(simcall , (smx_action_t) simcall->args[0].dp); + simcall_HANDLER_host_execution_destroy(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_EXECUTION_CANCEL: - SIMIX_pre_host_execution_cancel(simcall , (smx_action_t) simcall->args[0].dp); + simcall_HANDLER_host_execution_cancel(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_EXECUTION_GET_REMAINS: - simcall->result.d = SIMIX_pre_host_execution_get_remains(simcall , (smx_action_t) simcall->args[0].dp); + simcall->result.d = simcall_HANDLER_host_execution_get_remains(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_EXECUTION_GET_STATE: - simcall->result.i = SIMIX_pre_host_execution_get_state(simcall , (smx_action_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_host_execution_get_state(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_EXECUTION_SET_PRIORITY: - SIMIX_pre_host_execution_set_priority(simcall , (smx_action_t) simcall->args[0].dp, simcall->args[1].d); + simcall_HANDLER_host_execution_set_priority(simcall , (smx_action_t) simcall->args[0].dp, simcall->args[1].d); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_EXECUTION_SET_BOUND: - SIMIX_pre_host_execution_set_bound(simcall , (smx_action_t) simcall->args[0].dp, simcall->args[1].d); + simcall_HANDLER_host_execution_set_bound(simcall , (smx_action_t) simcall->args[0].dp, simcall->args[1].d); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_EXECUTION_SET_AFFINITY: - SIMIX_pre_host_execution_set_affinity(simcall , (smx_action_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp, simcall->args[2].ul); + simcall_HANDLER_host_execution_set_affinity(simcall , (smx_action_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp, simcall->args[2].ul); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_EXECUTION_WAIT: - SIMIX_pre_host_execution_wait(simcall , (smx_action_t) simcall->args[0].dp); + simcall_HANDLER_host_execution_wait(simcall , (smx_action_t) simcall->args[0].dp); break; case SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST: - simcall->result.dp = SIMIX_pre_host_get_mounted_storage_list(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_host_get_mounted_storage_list(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST: - simcall->result.dp = SIMIX_pre_host_get_attached_storage_list(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_host_get_attached_storage_list(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_PARAMS: - SIMIX_pre_host_get_params(simcall , (smx_host_t) simcall->args[0].dp, (ws_params_t) simcall->args[1].dp); + simcall_HANDLER_host_get_params(simcall , (smx_host_t) simcall->args[0].dp, (ws_params_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_SET_PARAMS: - SIMIX_pre_host_set_params(simcall , (smx_host_t) simcall->args[0].dp, (ws_params_t) simcall->args[1].dp); + simcall_HANDLER_host_set_params(simcall , (smx_host_t) simcall->args[0].dp, (ws_params_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_CREATE: - simcall->result.dp = SIMIX_pre_vm_create(simcall , simcall->args[0].cc, (smx_host_t) simcall->args[1].dp); + simcall->result.dp = simcall_HANDLER_vm_create(simcall , simcall->args[0].cc, (smx_host_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_START: - SIMIX_pre_vm_start(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_start(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_GET_STATE: - simcall->result.i = SIMIX_pre_vm_get_state(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_vm_get_state(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_MIGRATE: - SIMIX_pre_vm_migrate(simcall , (smx_host_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); + simcall_HANDLER_vm_migrate(simcall , (smx_host_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_GET_PM: - simcall->result.dp = SIMIX_pre_vm_get_pm(simcall , (smx_host_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_vm_get_pm(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_SET_BOUND: - SIMIX_pre_vm_set_bound(simcall , (smx_host_t) simcall->args[0].dp, simcall->args[1].d); + simcall_HANDLER_vm_set_bound(simcall , (smx_host_t) simcall->args[0].dp, simcall->args[1].d); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_SET_AFFINITY: - SIMIX_pre_vm_set_affinity(simcall , (smx_host_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp, simcall->args[2].ul); + simcall_HANDLER_vm_set_affinity(simcall , (smx_host_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp, simcall->args[2].ul); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_DESTROY: - SIMIX_pre_vm_destroy(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_destroy(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_SUSPEND: - SIMIX_pre_vm_suspend(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_suspend(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_RESUME: - SIMIX_pre_vm_resume(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_resume(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_SHUTDOWN: - SIMIX_pre_vm_shutdown(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_shutdown(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_SAVE: - SIMIX_pre_vm_save(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_save(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_RESTORE: - SIMIX_pre_vm_restore(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_restore(simcall , (smx_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_CREATE: - SIMIX_pre_process_create(simcall , (smx_process_t*) simcall->args[0].dp, simcall->args[1].cc, (xbt_main_func_t) simcall->args[2].fp, simcall->args[3].dp, simcall->args[4].cc, simcall->args[5].d, simcall->args[6].i, (char**) simcall->args[7].dp, (xbt_dict_t) simcall->args[8].dp, simcall->args[9].i); + simcall_HANDLER_process_create(simcall , (smx_process_t*) simcall->args[0].dp, simcall->args[1].cc, (xbt_main_func_t) simcall->args[2].fp, simcall->args[3].dp, simcall->args[4].cc, simcall->args[5].d, simcall->args[6].i, (char**) simcall->args[7].dp, (xbt_dict_t) simcall->args[8].dp, simcall->args[9].i); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_KILL: - SIMIX_pre_process_kill(simcall , (smx_process_t) simcall->args[0].dp); + simcall_HANDLER_process_kill(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_KILLALL: - SIMIX_pre_process_killall(simcall , simcall->args[0].i); + simcall_HANDLER_process_killall(simcall , simcall->args[0].i); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_CLEANUP: - SIMIX_pre_process_cleanup(simcall , (smx_process_t) simcall->args[0].dp); + simcall_HANDLER_process_cleanup(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_CHANGE_HOST: - SIMIX_pre_process_change_host(simcall , (smx_process_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); + simcall_HANDLER_process_change_host(simcall , (smx_process_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_SUSPEND: - SIMIX_pre_process_suspend(simcall , (smx_process_t) simcall->args[0].dp); + simcall_HANDLER_process_suspend(simcall , (smx_process_t) simcall->args[0].dp); break; case SIMCALL_PROCESS_RESUME: - SIMIX_pre_process_resume(simcall , (smx_process_t) simcall->args[0].dp); + simcall_HANDLER_process_resume(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_COUNT: - simcall->result.i = SIMIX_pre_process_count(simcall ); + simcall->result.i = simcall_HANDLER_process_count(simcall ); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_GET_PID: - simcall->result.i = SIMIX_pre_process_get_PID(simcall , (smx_process_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_process_get_PID(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_GET_PPID: - simcall->result.i = SIMIX_pre_process_get_PPID(simcall , (smx_process_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_process_get_PPID(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_GET_DATA: - simcall->result.dp = SIMIX_pre_process_get_data(simcall , (smx_process_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_process_get_data(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_SET_DATA: - SIMIX_pre_process_set_data(simcall , (smx_process_t) simcall->args[0].dp, simcall->args[1].dp); + simcall_HANDLER_process_set_data(simcall , (smx_process_t) simcall->args[0].dp, simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_GET_HOST: - simcall->result.dp = SIMIX_pre_process_get_host(simcall , (smx_process_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_process_get_host(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_GET_NAME: - simcall->result.cc = SIMIX_pre_process_get_name(simcall , (smx_process_t) simcall->args[0].dp); + simcall->result.cc = simcall_HANDLER_process_get_name(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_IS_SUSPENDED: - simcall->result.i = SIMIX_pre_process_is_suspended(simcall , (smx_process_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_process_is_suspended(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_GET_PROPERTIES: - simcall->result.dp = SIMIX_pre_process_get_properties(simcall , (smx_process_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_process_get_properties(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_JOIN: - SIMIX_pre_process_join(simcall , (smx_process_t) simcall->args[0].dp, simcall->args[1].d); + simcall_HANDLER_process_join(simcall , (smx_process_t) simcall->args[0].dp, simcall->args[1].d); break; case SIMCALL_PROCESS_SLEEP: - SIMIX_pre_process_sleep(simcall , simcall->args[0].d); + simcall_HANDLER_process_sleep(simcall , simcall->args[0].d); break; case SIMCALL_PROCESS_ON_EXIT: - SIMIX_pre_process_on_exit(simcall , (smx_process_t) simcall->args[0].dp, (int_f_pvoid_pvoid_t) simcall->args[1].fp, simcall->args[2].dp); + simcall_HANDLER_process_on_exit(simcall , (smx_process_t) simcall->args[0].dp, (int_f_pvoid_pvoid_t) simcall->args[1].fp, simcall->args[2].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_AUTO_RESTART_SET: - SIMIX_pre_process_auto_restart_set(simcall , (smx_process_t) simcall->args[0].dp, simcall->args[1].i); + simcall_HANDLER_process_auto_restart_set(simcall , (smx_process_t) simcall->args[0].dp, simcall->args[1].i); SIMIX_simcall_answer(simcall); break; case SIMCALL_PROCESS_RESTART: - simcall->result.dp = SIMIX_pre_process_restart(simcall , (smx_process_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_process_restart(simcall , (smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_RDV_CREATE: - simcall->result.dp = SIMIX_pre_rdv_create(simcall , simcall->args[0].cc); + simcall->result.dp = simcall_HANDLER_rdv_create(simcall , simcall->args[0].cc); SIMIX_simcall_answer(simcall); break; case SIMCALL_RDV_DESTROY: - SIMIX_pre_rdv_destroy(simcall , (smx_rdv_t) simcall->args[0].dp); + simcall_HANDLER_rdv_destroy(simcall , (smx_rdv_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_RDV_COMM_COUNT_BY_HOST: - simcall->result.ui = SIMIX_pre_rdv_comm_count_by_host(simcall , (smx_rdv_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); + simcall->result.ui = simcall_HANDLER_rdv_comm_count_by_host(simcall , (smx_rdv_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_RDV_GET_HEAD: - simcall->result.dp = SIMIX_pre_rdv_get_head(simcall , (smx_rdv_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_rdv_get_head(simcall , (smx_rdv_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_RDV_SET_RECEIVER: - SIMIX_pre_rdv_set_receiver(simcall , (smx_rdv_t) simcall->args[0].dp, (smx_process_t) simcall->args[1].dp); + simcall_HANDLER_rdv_set_receiver(simcall , (smx_rdv_t) simcall->args[0].dp, (smx_process_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_RDV_GET_RECEIVER: - simcall->result.dp = SIMIX_pre_rdv_get_receiver(simcall , (smx_rdv_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_rdv_get_receiver(simcall , (smx_rdv_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COMM_IPROBE: - simcall->result.dp = SIMIX_pre_comm_iprobe(simcall , (smx_rdv_t) simcall->args[0].dp, simcall->args[1].i, simcall->args[2].i, simcall->args[3].i, (simix_match_func_t) simcall->args[4].fp, simcall->args[5].dp); + simcall->result.dp = simcall_HANDLER_comm_iprobe(simcall , (smx_rdv_t) simcall->args[0].dp, simcall->args[1].i, simcall->args[2].i, simcall->args[3].i, (simix_match_func_t) simcall->args[4].fp, simcall->args[5].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COMM_SEND: - SIMIX_pre_comm_send(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp, simcall->args[2].d, simcall->args[3].d, simcall->args[4].dp, simcall->args[5].sz, (simix_match_func_t) simcall->args[6].fp, (simix_copy_data_func_t) simcall->args[7].fp, simcall->args[8].dp, simcall->args[9].d); + simcall_HANDLER_comm_send(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp, simcall->args[2].d, simcall->args[3].d, simcall->args[4].dp, simcall->args[5].sz, (simix_match_func_t) simcall->args[6].fp, (simix_copy_data_func_t) simcall->args[7].fp, simcall->args[8].dp, simcall->args[9].d); break; case SIMCALL_COMM_ISEND: - simcall->result.dp = SIMIX_pre_comm_isend(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp, simcall->args[2].d, simcall->args[3].d, simcall->args[4].dp, simcall->args[5].sz, (simix_match_func_t) simcall->args[6].fp, (simix_clean_func_t) simcall->args[7].fp, (simix_copy_data_func_t) simcall->args[8].fp, simcall->args[9].dp, simcall->args[10].i); + simcall->result.dp = simcall_HANDLER_comm_isend(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp, simcall->args[2].d, simcall->args[3].d, simcall->args[4].dp, simcall->args[5].sz, (simix_match_func_t) simcall->args[6].fp, (simix_clean_func_t) simcall->args[7].fp, (simix_copy_data_func_t) simcall->args[8].fp, simcall->args[9].dp, simcall->args[10].i); SIMIX_simcall_answer(simcall); break; case SIMCALL_COMM_RECV: - SIMIX_pre_comm_recv(simcall , (smx_rdv_t) simcall->args[0].dp, simcall->args[1].dp, (size_t*) simcall->args[2].dp, (simix_match_func_t) simcall->args[3].fp, (simix_copy_data_func_t) simcall->args[4].fp, simcall->args[5].dp, simcall->args[6].d, simcall->args[7].d); + simcall_HANDLER_comm_recv(simcall , (smx_rdv_t) simcall->args[0].dp, simcall->args[1].dp, (size_t*) simcall->args[2].dp, (simix_match_func_t) simcall->args[3].fp, (simix_copy_data_func_t) simcall->args[4].fp, simcall->args[5].dp, simcall->args[6].d, simcall->args[7].d); break; case SIMCALL_COMM_IRECV: - simcall->result.dp = SIMIX_pre_comm_irecv(simcall , (smx_rdv_t) simcall->args[0].dp, simcall->args[1].dp, (size_t*) simcall->args[2].dp, (simix_match_func_t) simcall->args[3].fp, (simix_copy_data_func_t) simcall->args[4].fp, simcall->args[5].dp, simcall->args[6].d); + simcall->result.dp = simcall_HANDLER_comm_irecv(simcall , (smx_rdv_t) simcall->args[0].dp, simcall->args[1].dp, (size_t*) simcall->args[2].dp, (simix_match_func_t) simcall->args[3].fp, (simix_copy_data_func_t) simcall->args[4].fp, simcall->args[5].dp, simcall->args[6].d); SIMIX_simcall_answer(simcall); break; case SIMCALL_COMM_CANCEL: - SIMIX_pre_comm_cancel(simcall , (smx_action_t) simcall->args[0].dp); + simcall_HANDLER_comm_cancel(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COMM_WAITANY: - SIMIX_pre_comm_waitany(simcall , (xbt_dynar_t) simcall->args[0].dp); + simcall_HANDLER_comm_waitany(simcall , (xbt_dynar_t) simcall->args[0].dp); break; case SIMCALL_COMM_WAIT: - SIMIX_pre_comm_wait(simcall , (smx_action_t) simcall->args[0].dp, simcall->args[1].d); + simcall_HANDLER_comm_wait(simcall , (smx_action_t) simcall->args[0].dp, simcall->args[1].d); break; case SIMCALL_COMM_TEST: - SIMIX_pre_comm_test(simcall , (smx_action_t) simcall->args[0].dp); + simcall_HANDLER_comm_test(simcall , (smx_action_t) simcall->args[0].dp); break; case SIMCALL_COMM_TESTANY: - SIMIX_pre_comm_testany(simcall , (xbt_dynar_t) simcall->args[0].dp); + simcall_HANDLER_comm_testany(simcall , (xbt_dynar_t) simcall->args[0].dp); break; case SIMCALL_COMM_GET_REMAINS: - simcall->result.d = SIMIX_pre_comm_get_remains(simcall , (smx_action_t) simcall->args[0].dp); + simcall->result.d = simcall_HANDLER_comm_get_remains(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COMM_GET_STATE: - simcall->result.i = SIMIX_pre_comm_get_state(simcall , (smx_action_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_comm_get_state(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COMM_GET_SRC_DATA: - simcall->result.dp = SIMIX_pre_comm_get_src_data(simcall , (smx_action_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_comm_get_src_data(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COMM_GET_DST_DATA: - simcall->result.dp = SIMIX_pre_comm_get_dst_data(simcall , (smx_action_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_comm_get_dst_data(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COMM_GET_SRC_PROC: - simcall->result.dp = SIMIX_pre_comm_get_src_proc(simcall , (smx_action_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_comm_get_src_proc(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COMM_GET_DST_PROC: - simcall->result.dp = SIMIX_pre_comm_get_dst_proc(simcall , (smx_action_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_comm_get_dst_proc(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_MUTEX_INIT: - simcall->result.dp = SIMIX_pre_mutex_init(simcall ); + simcall->result.dp = simcall_HANDLER_mutex_init(simcall ); SIMIX_simcall_answer(simcall); break; case SIMCALL_MUTEX_DESTROY: - SIMIX_pre_mutex_destroy(simcall , (smx_mutex_t) simcall->args[0].dp); + simcall_HANDLER_mutex_destroy(simcall , (smx_mutex_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_MUTEX_LOCK: - SIMIX_pre_mutex_lock(simcall , (smx_mutex_t) simcall->args[0].dp); + simcall_HANDLER_mutex_lock(simcall , (smx_mutex_t) simcall->args[0].dp); break; case SIMCALL_MUTEX_TRYLOCK: - simcall->result.i = SIMIX_pre_mutex_trylock(simcall , (smx_mutex_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_mutex_trylock(simcall , (smx_mutex_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_MUTEX_UNLOCK: - SIMIX_pre_mutex_unlock(simcall , (smx_mutex_t) simcall->args[0].dp); + simcall_HANDLER_mutex_unlock(simcall , (smx_mutex_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COND_INIT: - simcall->result.dp = SIMIX_pre_cond_init(simcall ); + simcall->result.dp = simcall_HANDLER_cond_init(simcall ); SIMIX_simcall_answer(simcall); break; case SIMCALL_COND_DESTROY: - SIMIX_pre_cond_destroy(simcall , (smx_cond_t) simcall->args[0].dp); + simcall_HANDLER_cond_destroy(simcall , (smx_cond_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COND_SIGNAL: - SIMIX_pre_cond_signal(simcall , (smx_cond_t) simcall->args[0].dp); + simcall_HANDLER_cond_signal(simcall , (smx_cond_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_COND_WAIT: - SIMIX_pre_cond_wait(simcall , (smx_cond_t) simcall->args[0].dp, (smx_mutex_t) simcall->args[1].dp); + simcall_HANDLER_cond_wait(simcall , (smx_cond_t) simcall->args[0].dp, (smx_mutex_t) simcall->args[1].dp); break; case SIMCALL_COND_WAIT_TIMEOUT: - SIMIX_pre_cond_wait_timeout(simcall , (smx_cond_t) simcall->args[0].dp, (smx_mutex_t) simcall->args[1].dp, simcall->args[2].d); + simcall_HANDLER_cond_wait_timeout(simcall , (smx_cond_t) simcall->args[0].dp, (smx_mutex_t) simcall->args[1].dp, simcall->args[2].d); break; case SIMCALL_COND_BROADCAST: - SIMIX_pre_cond_broadcast(simcall , (smx_cond_t) simcall->args[0].dp); + simcall_HANDLER_cond_broadcast(simcall , (smx_cond_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_SEM_INIT: - simcall->result.dp = SIMIX_pre_sem_init(simcall , simcall->args[0].i); + simcall->result.dp = simcall_HANDLER_sem_init(simcall , simcall->args[0].i); SIMIX_simcall_answer(simcall); break; case SIMCALL_SEM_DESTROY: - SIMIX_pre_sem_destroy(simcall , (smx_sem_t) simcall->args[0].dp); + simcall_HANDLER_sem_destroy(simcall , (smx_sem_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_SEM_RELEASE: - SIMIX_pre_sem_release(simcall , (smx_sem_t) simcall->args[0].dp); + simcall_HANDLER_sem_release(simcall , (smx_sem_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_SEM_WOULD_BLOCK: - simcall->result.i = SIMIX_pre_sem_would_block(simcall , (smx_sem_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_sem_would_block(simcall , (smx_sem_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_SEM_ACQUIRE: - SIMIX_pre_sem_acquire(simcall , (smx_sem_t) simcall->args[0].dp); + simcall_HANDLER_sem_acquire(simcall , (smx_sem_t) simcall->args[0].dp); break; case SIMCALL_SEM_ACQUIRE_TIMEOUT: - SIMIX_pre_sem_acquire_timeout(simcall , (smx_sem_t) simcall->args[0].dp, simcall->args[1].d); + simcall_HANDLER_sem_acquire_timeout(simcall , (smx_sem_t) simcall->args[0].dp, simcall->args[1].d); break; case SIMCALL_SEM_GET_CAPACITY: - simcall->result.i = SIMIX_pre_sem_get_capacity(simcall , (smx_sem_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_sem_get_capacity(simcall , (smx_sem_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_FILE_READ: - SIMIX_pre_file_read(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].sgsz, (smx_host_t) simcall->args[2].dp); + simcall_HANDLER_file_read(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].sgsz, (smx_host_t) simcall->args[2].dp); break; case SIMCALL_FILE_WRITE: - SIMIX_pre_file_write(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].sgsz, (smx_host_t) simcall->args[2].dp); + simcall_HANDLER_file_write(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].sgsz, (smx_host_t) simcall->args[2].dp); break; case SIMCALL_FILE_OPEN: - SIMIX_pre_file_open(simcall , simcall->args[0].cc, (smx_host_t) simcall->args[1].dp); + simcall_HANDLER_file_open(simcall , simcall->args[0].cc, (smx_host_t) simcall->args[1].dp); break; case SIMCALL_FILE_CLOSE: - SIMIX_pre_file_close(simcall , (smx_file_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); + simcall_HANDLER_file_close(simcall , (smx_file_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); break; case SIMCALL_FILE_UNLINK: - simcall->result.i = SIMIX_pre_file_unlink(simcall , (smx_file_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); + simcall->result.i = simcall_HANDLER_file_unlink(simcall , (smx_file_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_FILE_GET_SIZE: - simcall->result.sgsz = SIMIX_pre_file_get_size(simcall , (smx_file_t) simcall->args[0].dp); + simcall->result.sgsz = simcall_HANDLER_file_get_size(simcall , (smx_file_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_FILE_TELL: - simcall->result.sgsz = SIMIX_pre_file_tell(simcall , (smx_file_t) simcall->args[0].dp); + simcall->result.sgsz = simcall_HANDLER_file_tell(simcall , (smx_file_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_FILE_SEEK: - simcall->result.i = SIMIX_pre_file_seek(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].sgoff, simcall->args[2].i); + simcall->result.i = simcall_HANDLER_file_seek(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].sgoff, simcall->args[2].i); SIMIX_simcall_answer(simcall); break; case SIMCALL_FILE_GET_INFO: - simcall->result.dp = SIMIX_pre_file_get_info(simcall , (smx_file_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_file_get_info(simcall , (smx_file_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_FILE_MOVE: - simcall->result.i = SIMIX_pre_file_move(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].cc); + simcall->result.i = simcall_HANDLER_file_move(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].cc); SIMIX_simcall_answer(simcall); break; case SIMCALL_STORAGE_GET_FREE_SIZE: - simcall->result.sgsz = SIMIX_pre_storage_get_free_size(simcall , (smx_storage_t) simcall->args[0].dp); + simcall->result.sgsz = simcall_HANDLER_storage_get_free_size(simcall , (smx_storage_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_STORAGE_GET_USED_SIZE: - simcall->result.sgsz = SIMIX_pre_storage_get_used_size(simcall , (smx_storage_t) simcall->args[0].dp); + simcall->result.sgsz = simcall_HANDLER_storage_get_used_size(simcall , (smx_storage_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_STORAGE_GET_PROPERTIES: - simcall->result.dp = SIMIX_pre_storage_get_properties(simcall , (smx_storage_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_storage_get_properties(simcall , (smx_storage_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_STORAGE_GET_CONTENT: - simcall->result.dp = SIMIX_pre_storage_get_content(simcall , (smx_storage_t) simcall->args[0].dp); + simcall->result.dp = simcall_HANDLER_storage_get_content(simcall , (smx_storage_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_ASR_GET_PROPERTIES: - simcall->result.dp = SIMIX_pre_asr_get_properties(simcall , simcall->args[0].cc); + simcall->result.dp = simcall_HANDLER_asr_get_properties(simcall , simcall->args[0].cc); SIMIX_simcall_answer(simcall); break; #ifdef HAVE_LATENCY_BOUND_TRACKING case SIMCALL_COMM_IS_LATENCY_BOUNDED: - simcall->result.i = SIMIX_pre_comm_is_latency_bounded(simcall , (smx_action_t) simcall->args[0].dp); + simcall->result.i = simcall_HANDLER_comm_is_latency_bounded(simcall , (smx_action_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; @@ -748,7 +748,7 @@ case SIMCALL_COMM_IS_LATENCY_BOUNDED: #ifdef HAVE_TRACING case SIMCALL_SET_CATEGORY: - SIMIX_pre_set_category(simcall , (smx_action_t) simcall->args[0].dp, simcall->args[1].cc); + simcall_HANDLER_set_category(simcall , (smx_action_t) simcall->args[0].dp, simcall->args[1].cc); SIMIX_simcall_answer(simcall); break; @@ -756,17 +756,17 @@ case SIMCALL_SET_CATEGORY: #ifdef HAVE_MC case SIMCALL_MC_SNAPSHOT: - simcall->result.dp = SIMIX_pre_mc_snapshot(simcall ); + simcall->result.dp = simcall_HANDLER_mc_snapshot(simcall ); SIMIX_simcall_answer(simcall); break; case SIMCALL_MC_COMPARE_SNAPSHOTS: - simcall->result.i = SIMIX_pre_mc_compare_snapshots(simcall , simcall->args[0].dp, simcall->args[1].dp); + simcall->result.i = simcall_HANDLER_mc_compare_snapshots(simcall , simcall->args[0].dp, simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_MC_RANDOM: - simcall->result.i = SIMIX_pre_mc_random(simcall , simcall->args[0].i, simcall->args[1].i); + simcall->result.i = simcall_HANDLER_mc_random(simcall , simcall->args[0].i, simcall->args[1].i); SIMIX_simcall_answer(simcall); break; diff --git a/src/simix/popping_private.h b/src/simix/popping_private.h index cc2d741f29..3a37ccc6de 100644 --- a/src/simix/popping_private.h +++ b/src/simix/popping_private.h @@ -70,7 +70,7 @@ void SIMIX_simcall_handle(smx_simcall_t, int); void SIMIX_simcall_exit(smx_action_t); const char *SIMIX_simcall_name(e_smx_simcall_t kind); //FIXME put it in a better place -xbt_dict_t SIMIX_pre_asr_get_properties(smx_simcall_t simcall, const char *name); +xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char *name); SG_END_DECL() diff --git a/src/simix/simcalls.py b/src/simix/simcalls.py index ad1435e375..7adcb74767 100755 --- a/src/simix/simcalls.py +++ b/src/simix/simcalls.py @@ -56,18 +56,18 @@ class Simcall(object): def check(self): # smx_user.c simcall_BODY_ - # smx_*.c void SIMIX_pre_host_on(smx_simcall_t simcall, smx_host_t h) + # smx_*.c void simcall_HANDLER_host_on(smx_simcall_t simcall, smx_host_t h) self.check_body() self.check_pre() def check_body(self): if self.simcalls_BODY is None: - f = open('smx_user.c') + f = open('libsmx.c') self.simcalls_BODY = set(re.findall('simcall_BODY_(.*?)\(', f.read())) f.close() if self.name not in self.simcalls_BODY: print '# ERROR: No function calling simcall_BODY_%s'%self.name - print '# Add something like this to smx_user.c:' + print '# Add something like this to libsmx.c:' print '''%s simcall_%s(%s) { return simcall_BODY_%s(%s); @@ -85,12 +85,12 @@ class Simcall(object): self.simcalls_PRE = set() for fn in glob.glob('smx_*') + glob.glob('../mc/*'): f = open(fn) - self.simcalls_PRE |= set(re.findall('SIMIX_pre_(.*?)\(', f.read())) + self.simcalls_PRE |= set(re.findall('simcall_HANDLER_(.*?)\(', f.read())) f.close() if self.name not in self.simcalls_PRE: - print '# ERROR: No function called SIMIX_pre_%s'%self.name + print '# ERROR: No function called simcall_HANDLER_%s'%self.name print '# Add something like this to smx_.*.c:' - print '''%s SIMIX_pre_%s(smx_simcall_t simcall%s) + print '''%s simcall_HANDLER_%s(smx_simcall_t simcall%s) { // Your code handling the simcall }\n'''%(self.res.ret() @@ -136,7 +136,7 @@ static inline void simcall_%s__set__%s(smx_simcall_t simcall, %s arg){ def case(self): return '''case SIMCALL_%s: - %sSIMIX_pre_%s(simcall %s); + %ssimcall_HANDLER_%s(simcall %s); %sbreak; '''%(self.name.upper(), 'simcall->result.%s = '%self.res.field() if self.res.type != 'void' and self.has_answer else ' ', @@ -151,7 +151,7 @@ inline static %s simcall_BODY_%s(%s) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_pre_%s(%s); + if (0) simcall_HANDLER_%s(%s); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ self->simcall.call = SIMCALL_%s; diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index 78643dc999..5087d9454e 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -600,7 +600,7 @@ static void SIMIX_action_mallocator_reset_f(void* action) { ((smx_action_t) action)->simcalls = fifo; } -xbt_dict_t SIMIX_pre_asr_get_properties(smx_simcall_t simcall, const char *name){ +xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char *name){ return SIMIX_asr_get_properties(name); } xbt_dict_t SIMIX_asr_get_properties(const char *name) diff --git a/src/simix/smx_host.c b/src/simix/smx_host.c index 534e331e0f..b532191163 100644 --- a/src/simix/smx_host.c +++ b/src/simix/smx_host.c @@ -37,7 +37,7 @@ smx_host_t SIMIX_host_create(const char *name, return xbt_lib_get_elm_or_null(host_lib, name); } -void SIMIX_pre_host_on(smx_simcall_t simcall, smx_host_t h) +void simcall_HANDLER_host_on(smx_simcall_t simcall, smx_host_t h) { SIMIX_host_on(h); } @@ -93,7 +93,7 @@ void SIMIX_host_on(smx_host_t h) } } -void SIMIX_pre_host_off(smx_simcall_t simcall, smx_host_t h) +void simcall_HANDLER_host_off(smx_simcall_t simcall, smx_host_t h) { SIMIX_host_off(h, simcall->issuer); } @@ -182,7 +182,7 @@ void SIMIX_host_destroy(void *h) // } // return host_dict; //} -smx_host_t SIMIX_pre_host_get_by_name(smx_simcall_t simcall, const char *name){ +smx_host_t simcall_HANDLER_host_get_by_name(smx_simcall_t simcall, const char *name){ return SIMIX_host_get_by_name(name); } smx_host_t SIMIX_host_get_by_name(const char *name){ @@ -199,7 +199,7 @@ smx_host_t SIMIX_host_self(void) return (process == NULL) ? NULL : SIMIX_process_get_host(process); } -const char* SIMIX_pre_host_self_get_name(smx_simcall_t simcall){ +const char* simcall_HANDLER_host_self_get_name(smx_simcall_t simcall){ return SIMIX_host_self_get_name(); } /* needs to be public and without simcall because it is called @@ -213,7 +213,7 @@ const char* SIMIX_host_self_get_name(void) return SIMIX_host_get_name(host); } -const char* SIMIX_pre_host_get_name(smx_simcall_t simcall, smx_host_t host){ +const char* simcall_HANDLER_host_get_name(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_name(host); } const char* SIMIX_host_get_name(smx_host_t host){ @@ -222,7 +222,7 @@ const char* SIMIX_host_get_name(smx_host_t host){ return sg_host_name(host); } -xbt_dict_t SIMIX_pre_host_get_properties(smx_simcall_t simcall, smx_host_t host){ +xbt_dict_t simcall_HANDLER_host_get_properties(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_properties(host); } xbt_dict_t SIMIX_host_get_properties(smx_host_t host){ @@ -231,7 +231,7 @@ xbt_dict_t SIMIX_host_get_properties(smx_host_t host){ return surf_resource_get_properties(surf_workstation_resource_priv(host)); } -double SIMIX_pre_host_get_speed(smx_simcall_t simcall, smx_host_t host){ +double simcall_HANDLER_host_get_speed(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_speed(host); } double SIMIX_host_get_speed(smx_host_t host){ @@ -239,7 +239,7 @@ double SIMIX_host_get_speed(smx_host_t host){ return surf_workstation_get_speed(host, 1.0); } -int SIMIX_pre_host_get_core(smx_simcall_t simcall, smx_host_t host){ +int simcall_HANDLER_host_get_core(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_core(host); } int SIMIX_host_get_core(smx_host_t host){ @@ -248,7 +248,7 @@ int SIMIX_host_get_core(smx_host_t host){ return surf_workstation_get_core(host); } -xbt_swag_t SIMIX_pre_host_get_process_list(smx_simcall_t simcall, smx_host_t host){ +xbt_swag_t simcall_HANDLER_host_get_process_list(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_process_list(host); } @@ -260,7 +260,7 @@ xbt_swag_t SIMIX_host_get_process_list(smx_host_t host){ } -double SIMIX_pre_host_get_available_speed(smx_simcall_t simcall, smx_host_t host){ +double simcall_HANDLER_host_get_available_speed(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_available_speed(host); } double SIMIX_host_get_available_speed(smx_host_t host){ @@ -269,7 +269,7 @@ double SIMIX_host_get_available_speed(smx_host_t host){ return surf_workstation_get_available_speed(host); } -double SIMIX_pre_host_get_current_power_peak(smx_simcall_t simcall, smx_host_t host){ +double simcall_HANDLER_host_get_current_power_peak(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_current_power_peak(host); } double SIMIX_host_get_current_power_peak(smx_host_t host) { @@ -277,7 +277,7 @@ double SIMIX_host_get_current_power_peak(smx_host_t host) { return surf_workstation_get_current_power_peak(host); } -double SIMIX_pre_host_get_power_peak_at(smx_simcall_t simcall, smx_host_t host, int pstate_index){ +double simcall_HANDLER_host_get_power_peak_at(smx_simcall_t simcall, smx_host_t host, int pstate_index){ return SIMIX_host_get_power_peak_at(host, pstate_index); } double SIMIX_host_get_power_peak_at(smx_host_t host, int pstate_index) { @@ -286,7 +286,7 @@ double SIMIX_host_get_power_peak_at(smx_host_t host, int pstate_index) { return surf_workstation_get_power_peak_at(host, pstate_index); } -int SIMIX_pre_host_get_nb_pstates(smx_simcall_t simcall, smx_host_t host){ +int simcall_HANDLER_host_get_nb_pstates(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_nb_pstates(host); } int SIMIX_host_get_nb_pstates(smx_host_t host) { @@ -296,7 +296,7 @@ int SIMIX_host_get_nb_pstates(smx_host_t host) { } -void SIMIX_pre_host_set_power_peak_at(smx_simcall_t simcall, smx_host_t host, int pstate_index){ +void simcall_HANDLER_host_set_power_peak_at(smx_simcall_t simcall, smx_host_t host, int pstate_index){ SIMIX_host_set_power_peak_at(host, pstate_index); } void SIMIX_host_set_power_peak_at(smx_host_t host, int pstate_index) { @@ -305,7 +305,7 @@ void SIMIX_host_set_power_peak_at(smx_host_t host, int pstate_index) { surf_workstation_set_power_peak_at(host, pstate_index); } -double SIMIX_pre_host_get_consumed_energy(smx_simcall_t simcall, smx_host_t host){ +double simcall_HANDLER_host_get_consumed_energy(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_consumed_energy(host); } double SIMIX_host_get_consumed_energy(smx_host_t host) { @@ -313,7 +313,7 @@ double SIMIX_host_get_consumed_energy(smx_host_t host) { return surf_workstation_get_consumed_energy(host); } -int SIMIX_pre_host_get_state(smx_simcall_t simcall, smx_host_t host){ +int simcall_HANDLER_host_get_state(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_state(host); } int SIMIX_host_get_state(smx_host_t host){ @@ -436,7 +436,7 @@ void SIMIX_host_autorestart(smx_host_t host) xbt_die("No function for simix_global->autorestart"); } -smx_action_t SIMIX_pre_host_execute(smx_simcall_t simcall,const char *name, +smx_action_t simcall_HANDLER_host_execute(smx_simcall_t simcall,const char *name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask){ return SIMIX_host_execute(name, host, computation_amount, priority, bound, affinity_mask); } @@ -481,7 +481,7 @@ smx_action_t SIMIX_host_execute(const char *name, return action; } -smx_action_t SIMIX_pre_host_parallel_execute(smx_simcall_t simcall, const char *name, +smx_action_t simcall_HANDLER_host_parallel_execute(smx_simcall_t simcall, const char *name, int host_nb, smx_host_t *host_list, double *computation_amount, double *communication_amount, double amount, double rate){ @@ -538,7 +538,7 @@ smx_action_t SIMIX_host_parallel_execute(const char *name, return action; } -void SIMIX_pre_host_execution_destroy(smx_simcall_t simcall, smx_action_t action){ +void simcall_HANDLER_host_execution_destroy(smx_simcall_t simcall, smx_action_t action){ SIMIX_host_execution_destroy(action); } void SIMIX_host_execution_destroy(smx_action_t action){ @@ -552,7 +552,7 @@ void SIMIX_host_execution_destroy(smx_action_t action){ xbt_mallocator_release(simix_global->action_mallocator, action); } -void SIMIX_pre_host_execution_cancel(smx_simcall_t simcall, smx_action_t action){ +void simcall_HANDLER_host_execution_cancel(smx_simcall_t simcall, smx_action_t action){ SIMIX_host_execution_cancel(action); } void SIMIX_host_execution_cancel(smx_action_t action){ @@ -562,7 +562,7 @@ void SIMIX_host_execution_cancel(smx_action_t action){ surf_action_cancel(action->execution.surf_exec); } -double SIMIX_pre_host_execution_get_remains(smx_simcall_t simcall, smx_action_t action){ +double simcall_HANDLER_host_execution_get_remains(smx_simcall_t simcall, smx_action_t action){ return SIMIX_host_execution_get_remains(action); } double SIMIX_host_execution_get_remains(smx_action_t action){ @@ -574,14 +574,14 @@ double SIMIX_host_execution_get_remains(smx_action_t action){ return result; } -e_smx_state_t SIMIX_pre_host_execution_get_state(smx_simcall_t simcall, smx_action_t action){ +e_smx_state_t simcall_HANDLER_host_execution_get_state(smx_simcall_t simcall, smx_action_t action){ return SIMIX_host_execution_get_state(action); } e_smx_state_t SIMIX_host_execution_get_state(smx_action_t action){ return action->state; } -void SIMIX_pre_host_execution_set_priority(smx_simcall_t simcall, smx_action_t action, +void simcall_HANDLER_host_execution_set_priority(smx_simcall_t simcall, smx_action_t action, double priority){ SIMIX_host_execution_set_priority(action, priority); } @@ -591,7 +591,7 @@ void SIMIX_host_execution_set_priority(smx_action_t action, double priority){ surf_action_set_priority(action->execution.surf_exec, priority); } -void SIMIX_pre_host_execution_set_bound(smx_simcall_t simcall, smx_action_t action, +void simcall_HANDLER_host_execution_set_bound(smx_simcall_t simcall, smx_action_t action, double bound){ SIMIX_host_execution_set_bound(action, bound); } @@ -601,7 +601,7 @@ void SIMIX_host_execution_set_bound(smx_action_t action, double bound){ surf_cpu_action_set_bound(action->execution.surf_exec, bound); } -void SIMIX_pre_host_execution_set_affinity(smx_simcall_t simcall, +void simcall_HANDLER_host_execution_set_affinity(smx_simcall_t simcall, smx_action_t action, smx_host_t host, unsigned long mask){ SIMIX_host_execution_set_affinity(action, host, mask); } @@ -615,7 +615,7 @@ void SIMIX_host_execution_set_affinity(smx_action_t action, smx_host_t host, uns } } -void SIMIX_pre_host_execution_wait(smx_simcall_t simcall, smx_action_t action){ +void simcall_HANDLER_host_execution_wait(smx_simcall_t simcall, smx_action_t action){ XBT_DEBUG("Wait for execution of action %p, state %d", action, (int)action->state); @@ -720,7 +720,7 @@ void SIMIX_post_host_execute(smx_action_t action) #ifdef HAVE_TRACING -void SIMIX_pre_set_category(smx_simcall_t simcall, smx_action_t action, +void simcall_HANDLER_set_category(smx_simcall_t simcall, smx_action_t action, const char *category){ SIMIX_set_category(action, category); } @@ -747,7 +747,7 @@ void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params) surf_workstation_get_params(ind_vm, params); } -void SIMIX_pre_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params) +void simcall_HANDLER_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params) { SIMIX_host_get_params(ind_vm, params); } @@ -758,12 +758,12 @@ void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params) surf_workstation_set_params(ind_vm, params); } -void SIMIX_pre_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params) +void simcall_HANDLER_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params) { SIMIX_host_set_params(ind_vm, params); } -xbt_dict_t SIMIX_pre_host_get_mounted_storage_list(smx_simcall_t simcall, smx_host_t host){ +xbt_dict_t simcall_HANDLER_host_get_mounted_storage_list(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_mounted_storage_list(host); } @@ -773,7 +773,7 @@ xbt_dict_t SIMIX_host_get_mounted_storage_list(smx_host_t host){ return surf_workstation_get_mounted_storage_list(host); } -xbt_dynar_t SIMIX_pre_host_get_attached_storage_list(smx_simcall_t simcall, smx_host_t host){ +xbt_dynar_t simcall_HANDLER_host_get_attached_storage_list(smx_simcall_t simcall, smx_host_t host){ return SIMIX_host_get_attached_storage_list(host); } diff --git a/src/simix/smx_host_private.h b/src/simix/smx_host_private.h index a26a9c4b04..f9de66b160 100644 --- a/src/simix/smx_host_private.h +++ b/src/simix/smx_host_private.h @@ -65,95 +65,95 @@ e_smx_state_t SIMIX_host_execution_get_state(smx_action_t action); void SIMIX_host_execution_set_priority(smx_action_t action, double priority); void SIMIX_host_execution_set_bound(smx_action_t action, double bound); void SIMIX_host_execution_set_affinity(smx_action_t action, smx_host_t host, unsigned long mask); -void SIMIX_pre_host_execution_wait(smx_simcall_t simcall, smx_action_t action); +void simcall_HANDLER_host_execution_wait(smx_simcall_t simcall, smx_action_t action); xbt_dict_t SIMIX_host_get_mounted_storage_list(smx_host_t host); xbt_dynar_t SIMIX_host_get_attached_storage_list(smx_host_t host); -// pre prototypes -smx_host_t SIMIX_pre_host_get_by_name(smx_simcall_t, const char*); -const char* SIMIX_pre_host_self_get_name(smx_simcall_t); -const char* SIMIX_pre_host_get_name(smx_simcall_t, smx_host_t); -void SIMIX_pre_host_on(smx_simcall_t, smx_host_t host); -void SIMIX_pre_host_off(smx_simcall_t, smx_host_t host); -xbt_dict_t SIMIX_pre_host_get_properties(smx_simcall_t, smx_host_t); -int SIMIX_pre_host_get_core(smx_simcall_t, smx_host_t); -xbt_swag_t SIMIX_pre_host_get_process_list(smx_simcall_t, smx_host_t host); -double SIMIX_pre_host_get_speed(smx_simcall_t, smx_host_t); -double SIMIX_pre_host_get_available_speed(smx_simcall_t, smx_host_t); -int SIMIX_pre_host_get_state(smx_simcall_t, smx_host_t); -double SIMIX_pre_host_get_current_power_peak(smx_simcall_t, smx_host_t); -double SIMIX_pre_host_get_power_peak_at(smx_simcall_t, smx_host_t host, int pstate_index); -int SIMIX_pre_host_get_nb_pstates(smx_simcall_t, smx_host_t host); -void SIMIX_pre_host_set_power_peak_at(smx_simcall_t, smx_host_t host, int pstate_index); -double SIMIX_pre_host_get_consumed_energy(smx_simcall_t, smx_host_t); -void* SIMIX_pre_host_self_get_data(smx_simcall_t); -smx_action_t SIMIX_pre_host_execute(smx_simcall_t, const char*, smx_host_t, double, double, double, unsigned long); -smx_action_t SIMIX_pre_host_parallel_execute(smx_simcall_t, const char*, int, smx_host_t*, +// handlers' prototypes +smx_host_t simcall_HANDLER_host_get_by_name(smx_simcall_t, const char*); +const char* simcall_HANDLER_host_self_get_name(smx_simcall_t); +const char* simcall_HANDLER_host_get_name(smx_simcall_t, smx_host_t); +void simcall_HANDLER_host_on(smx_simcall_t, smx_host_t host); +void simcall_HANDLER_host_off(smx_simcall_t, smx_host_t host); +xbt_dict_t simcall_HANDLER_host_get_properties(smx_simcall_t, smx_host_t); +int simcall_HANDLER_host_get_core(smx_simcall_t, smx_host_t); +xbt_swag_t simcall_HANDLER_host_get_process_list(smx_simcall_t, smx_host_t host); +double simcall_HANDLER_host_get_speed(smx_simcall_t, smx_host_t); +double simcall_HANDLER_host_get_available_speed(smx_simcall_t, smx_host_t); +int simcall_HANDLER_host_get_state(smx_simcall_t, smx_host_t); +double simcall_HANDLER_host_get_current_power_peak(smx_simcall_t, smx_host_t); +double simcall_HANDLER_host_get_power_peak_at(smx_simcall_t, smx_host_t host, int pstate_index); +int simcall_HANDLER_host_get_nb_pstates(smx_simcall_t, smx_host_t host); +void simcall_HANDLER_host_set_power_peak_at(smx_simcall_t, smx_host_t host, int pstate_index); +double simcall_HANDLER_host_get_consumed_energy(smx_simcall_t, smx_host_t); +void* simcall_HANDLER_host_self_get_data(smx_simcall_t); +smx_action_t simcall_HANDLER_host_execute(smx_simcall_t, const char*, smx_host_t, double, double, double, unsigned long); +smx_action_t simcall_HANDLER_host_parallel_execute(smx_simcall_t, const char*, int, smx_host_t*, double*, double*, double, double); -void SIMIX_pre_host_execution_destroy(smx_simcall_t, smx_action_t); -void SIMIX_pre_host_execution_cancel(smx_simcall_t, smx_action_t); -double SIMIX_pre_host_execution_get_remains(smx_simcall_t, smx_action_t); -e_smx_state_t SIMIX_pre_host_execution_get_state(smx_simcall_t, smx_action_t); -void SIMIX_pre_host_execution_set_priority(smx_simcall_t, smx_action_t, double); -void SIMIX_pre_host_execution_set_bound(smx_simcall_t simcall, smx_action_t action, double bound); -void SIMIX_pre_host_execution_set_affinity(smx_simcall_t simcall, smx_action_t action, smx_host_t host, unsigned long mask); +void simcall_HANDLER_host_execution_destroy(smx_simcall_t, smx_action_t); +void simcall_HANDLER_host_execution_cancel(smx_simcall_t, smx_action_t); +double simcall_HANDLER_host_execution_get_remains(smx_simcall_t, smx_action_t); +e_smx_state_t simcall_HANDLER_host_execution_get_state(smx_simcall_t, smx_action_t); +void simcall_HANDLER_host_execution_set_priority(smx_simcall_t, smx_action_t, double); +void simcall_HANDLER_host_execution_set_bound(smx_simcall_t simcall, smx_action_t action, double bound); +void simcall_HANDLER_host_execution_set_affinity(smx_simcall_t simcall, smx_action_t action, smx_host_t host, unsigned long mask); void SIMIX_host_execution_suspend(smx_action_t action); void SIMIX_host_execution_resume(smx_action_t action); void SIMIX_post_host_execute(smx_action_t action); -xbt_dict_t SIMIX_pre_host_get_mounted_storage_list(smx_simcall_t, smx_host_t); -xbt_dynar_t SIMIX_pre_host_get_attached_storage_list(smx_simcall_t, smx_host_t); +xbt_dict_t simcall_HANDLER_host_get_mounted_storage_list(smx_simcall_t, smx_host_t); +xbt_dynar_t simcall_HANDLER_host_get_attached_storage_list(smx_simcall_t, smx_host_t); #ifdef HAVE_TRACING -void SIMIX_pre_set_category(smx_simcall_t simcall, smx_action_t action, +void simcall_HANDLER_set_category(smx_simcall_t simcall, smx_action_t action, const char *category); void SIMIX_set_category(smx_action_t action, const char *category); #endif /* vm related stuff */ smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host); -smx_host_t SIMIX_pre_vm_create(smx_simcall_t simcall, const char *name, smx_host_t ind_phys_host); +smx_host_t simcall_HANDLER_vm_create(smx_simcall_t simcall, const char *name, smx_host_t ind_phys_host); void SIMIX_vm_destroy(smx_host_t ind_vm); -void SIMIX_pre_vm_destroy(smx_simcall_t simcall, smx_host_t ind_vm); +void simcall_HANDLER_vm_destroy(smx_simcall_t simcall, smx_host_t ind_vm); // -- void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer); -void SIMIX_pre_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm); +void simcall_HANDLER_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm); void SIMIX_vm_suspend(smx_host_t ind_vm, smx_process_t issuer); -void SIMIX_pre_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm); +void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm); // -- void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer); -void SIMIX_pre_vm_save(smx_simcall_t simcall, smx_host_t ind_vm); +void simcall_HANDLER_vm_save(smx_simcall_t simcall, smx_host_t ind_vm); void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer); -void SIMIX_pre_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm); +void simcall_HANDLER_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm); // -- void SIMIX_vm_start(smx_host_t ind_vm); -void SIMIX_pre_vm_start(smx_simcall_t simcall, smx_host_t ind_vm); +void simcall_HANDLER_vm_start(smx_simcall_t simcall, smx_host_t ind_vm); void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer); -void SIMIX_pre_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm); +void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm); // -- int SIMIX_vm_get_state(smx_host_t ind_vm); -int SIMIX_pre_vm_get_state(smx_simcall_t simcall, smx_host_t ind_vm); +int simcall_HANDLER_vm_get_state(smx_simcall_t simcall, smx_host_t ind_vm); // -- void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm); -void SIMIX_pre_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm); +void simcall_HANDLER_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm); void *SIMIX_vm_get_pm(smx_host_t ind_vm); -void *SIMIX_pre_vm_get_pm(smx_simcall_t simcall, smx_host_t ind_vm); +void *simcall_HANDLER_vm_get_pm(smx_simcall_t simcall, smx_host_t ind_vm); void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound); -void SIMIX_pre_vm_set_bound(smx_simcall_t simcall, smx_host_t ind_vm, double bound); +void simcall_HANDLER_vm_set_bound(smx_simcall_t simcall, smx_host_t ind_vm, double bound); void SIMIX_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask); -void SIMIX_pre_vm_set_affinity(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask); +void simcall_HANDLER_vm_set_affinity(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask); void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params); -void SIMIX_pre_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params); +void simcall_HANDLER_host_get_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params); void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params); -void SIMIX_pre_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params); +void simcall_HANDLER_host_set_params(smx_simcall_t simcall, smx_host_t ind_vm, ws_params_t params); SG_END_DECL() diff --git a/src/simix/smx_io.c b/src/simix/smx_io.c index 97b1fc4255..962b85fa8d 100644 --- a/src/simix/smx_io.c +++ b/src/simix/smx_io.c @@ -50,7 +50,7 @@ void SIMIX_storage_destroy(void *s) } //SIMIX FILE READ -void SIMIX_pre_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host) +void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host) { smx_action_t action = SIMIX_file_read(simcall->issuer, fd, size, host); xbt_fifo_push(action->simcalls, simcall); @@ -84,7 +84,7 @@ smx_action_t SIMIX_file_read(smx_process_t process, smx_file_t fd, sg_size_t siz } //SIMIX FILE WRITE -void SIMIX_pre_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host) +void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host) { smx_action_t action = SIMIX_file_write(simcall->issuer, fd, size, host); xbt_fifo_push(action->simcalls, simcall); @@ -118,7 +118,7 @@ smx_action_t SIMIX_file_write(smx_process_t process, smx_file_t fd, sg_size_t si } //SIMIX FILE OPEN -void SIMIX_pre_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host) +void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host) { smx_action_t action = SIMIX_file_open(simcall->issuer, fullpath, host); xbt_fifo_push(action->simcalls, simcall); @@ -152,7 +152,7 @@ smx_action_t SIMIX_file_open(smx_process_t process, const char* fullpath, smx_ho } //SIMIX FILE CLOSE -void SIMIX_pre_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host) +void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host) { smx_action_t action = SIMIX_file_close(simcall->issuer, fd, host); xbt_fifo_push(action->simcalls, simcall); @@ -187,7 +187,7 @@ smx_action_t SIMIX_file_close(smx_process_t process, smx_file_t fd, smx_host_t h //SIMIX FILE UNLINK -int SIMIX_pre_file_unlink(smx_simcall_t simcall, smx_file_t fd, smx_host_t host) +int simcall_HANDLER_file_unlink(smx_simcall_t simcall, smx_file_t fd, smx_host_t host) { return SIMIX_file_unlink(simcall->issuer, fd, host); } @@ -205,7 +205,7 @@ int SIMIX_file_unlink(smx_process_t process, smx_file_t fd, smx_host_t host) return !!res; } -sg_size_t SIMIX_pre_file_get_size(smx_simcall_t simcall, smx_file_t fd) +sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd) { return SIMIX_file_get_size(simcall->issuer, fd); } @@ -216,7 +216,7 @@ sg_size_t SIMIX_file_get_size(smx_process_t process, smx_file_t fd) return surf_workstation_get_size(host, fd->surf_file); } -sg_size_t SIMIX_pre_file_tell(smx_simcall_t simcall, smx_file_t fd) +sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd) { return SIMIX_file_tell(simcall->issuer, fd); } @@ -228,7 +228,7 @@ sg_size_t SIMIX_file_tell(smx_process_t process, smx_file_t fd) } -xbt_dynar_t SIMIX_pre_file_get_info(smx_simcall_t simcall, smx_file_t fd) +xbt_dynar_t simcall_HANDLER_file_get_info(smx_simcall_t simcall, smx_file_t fd) { return SIMIX_file_get_info(simcall->issuer, fd); } @@ -239,7 +239,7 @@ xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd) return surf_workstation_get_info(host, fd->surf_file); } -int SIMIX_pre_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin) +int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin) { return SIMIX_file_seek(simcall->issuer, fd, offset, origin); } @@ -250,7 +250,7 @@ int SIMIX_file_seek(smx_process_t process, smx_file_t fd, sg_offset_t offset, in return surf_workstation_file_seek(host, fd->surf_file, offset, origin); } -int SIMIX_pre_file_move(smx_simcall_t simcall, smx_file_t file, const char* fullpath) +int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t file, const char* fullpath) { return SIMIX_file_move(simcall->issuer, file, fullpath); } @@ -266,7 +266,7 @@ sg_size_t SIMIX_storage_get_size(smx_storage_t storage){ return surf_storage_get_size(storage); } -sg_size_t SIMIX_pre_storage_get_free_size(smx_simcall_t simcall, smx_storage_t storage) +sg_size_t simcall_HANDLER_storage_get_free_size(smx_simcall_t simcall, smx_storage_t storage) { return SIMIX_storage_get_free_size(simcall->issuer, storage); } @@ -276,7 +276,7 @@ sg_size_t SIMIX_storage_get_free_size(smx_process_t process, smx_storage_t stora return surf_storage_get_free_size(storage); } -sg_size_t SIMIX_pre_storage_get_used_size(smx_simcall_t simcall, smx_storage_t storage) +sg_size_t simcall_HANDLER_storage_get_used_size(smx_simcall_t simcall, smx_storage_t storage) { return SIMIX_storage_get_used_size(simcall->issuer, storage); } @@ -286,7 +286,7 @@ sg_size_t SIMIX_storage_get_used_size(smx_process_t process, smx_storage_t stora return surf_storage_get_used_size(storage); } -xbt_dict_t SIMIX_pre_storage_get_properties(smx_simcall_t simcall, smx_storage_t storage){ +xbt_dict_t simcall_HANDLER_storage_get_properties(smx_simcall_t simcall, smx_storage_t storage){ return SIMIX_storage_get_properties(storage); } xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){ @@ -294,7 +294,7 @@ xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage){ return surf_resource_get_properties(surf_storage_resource_priv(storage)); } -const char* SIMIX_pre_storage_get_name(smx_simcall_t simcall, smx_storage_t storage){ +const char* simcall_HANDLER_storage_get_name(smx_simcall_t simcall, smx_storage_t storage){ return SIMIX_storage_get_name(storage); } @@ -303,7 +303,7 @@ const char* SIMIX_storage_get_name(smx_storage_t storage){ return sg_storage_name(storage); } -xbt_dict_t SIMIX_pre_storage_get_content(smx_simcall_t simcall, smx_storage_t storage){ +xbt_dict_t simcall_HANDLER_storage_get_content(smx_simcall_t simcall, smx_storage_t storage){ return SIMIX_storage_get_content(storage); } @@ -312,7 +312,7 @@ xbt_dict_t SIMIX_storage_get_content(smx_storage_t storage){ return surf_storage_get_content(storage); } -const char* SIMIX_pre_storage_get_host(smx_simcall_t simcall, smx_storage_t storage){ +const char* simcall_HANDLER_storage_get_host(smx_simcall_t simcall, smx_storage_t storage){ return SIMIX_storage_get_host(storage); } diff --git a/src/simix/smx_io_private.h b/src/simix/smx_io_private.h index f06e7835ca..fd49978745 100644 --- a/src/simix/smx_io_private.h +++ b/src/simix/smx_io_private.h @@ -22,16 +22,16 @@ static inline smx_storage_priv_t SIMIX_storage_priv(smx_storage_t storage){ smx_storage_t SIMIX_storage_create(const char *name, void *storage, void *data); void SIMIX_storage_destroy(void *s); -void SIMIX_pre_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host); -void SIMIX_pre_file_write(smx_simcall_t simcall,smx_file_t fd, sg_size_t size, smx_host_t host); -void SIMIX_pre_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host); -void SIMIX_pre_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host); -int SIMIX_pre_file_unlink(smx_simcall_t simcall, smx_file_t fd, smx_host_t host); -sg_size_t SIMIX_pre_file_get_size(smx_simcall_t simcall, smx_file_t fd); -sg_size_t SIMIX_pre_file_tell(smx_simcall_t simcall, smx_file_t fd); -xbt_dynar_t SIMIX_pre_file_get_info(smx_simcall_t simcall, smx_file_t fd); -int SIMIX_pre_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin); -int SIMIX_pre_file_move(smx_simcall_t simcall, smx_file_t fd, const char* fullpath); +void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host); +void simcall_HANDLER_file_write(smx_simcall_t simcall,smx_file_t fd, sg_size_t size, smx_host_t host); +void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host); +void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host); +int simcall_HANDLER_file_unlink(smx_simcall_t simcall, smx_file_t fd, smx_host_t host); +sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd); +sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd); +xbt_dynar_t simcall_HANDLER_file_get_info(smx_simcall_t simcall, smx_file_t fd); +int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin); +int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t fd, const char* fullpath); smx_action_t SIMIX_file_read(smx_process_t process, smx_file_t fd, sg_size_t size, smx_host_t host); smx_action_t SIMIX_file_write(smx_process_t process, smx_file_t fd, sg_size_t size, smx_host_t host); smx_action_t SIMIX_file_open(smx_process_t process, const char* fullpath, smx_host_t host); @@ -43,24 +43,22 @@ xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd); int SIMIX_file_seek(smx_process_t process, smx_file_t fd, sg_offset_t offset, int origin); int SIMIX_file_move(smx_process_t process, smx_file_t fd, const char* fullpath); -sg_size_t SIMIX_pre_storage_get_free_size(smx_simcall_t simcall,smx_storage_t storage); +sg_size_t simcall_HANDLER_storage_get_free_size(smx_simcall_t simcall,smx_storage_t storage); sg_size_t SIMIX_storage_get_free_size(smx_process_t process,smx_storage_t storage); -sg_size_t SIMIX_pre_storage_get_used_size(smx_simcall_t simcall,smx_storage_t storage); +sg_size_t simcall_HANDLER_storage_get_used_size(smx_simcall_t simcall,smx_storage_t storage); sg_size_t SIMIX_storage_get_used_size(smx_process_t process,smx_storage_t storage); xbt_dict_t SIMIX_storage_get_properties(smx_storage_t storage); -xbt_dict_t SIMIX_pre_storage_get_properties(smx_simcall_t, smx_storage_t); +xbt_dict_t simcall_HANDLER_storage_get_properties(smx_simcall_t, smx_storage_t); -xbt_dict_t SIMIX_pre_storage_get_content(smx_simcall_t simcall, smx_storage_t storage); +xbt_dict_t simcall_HANDLER_storage_get_content(smx_simcall_t simcall, smx_storage_t storage); xbt_dict_t SIMIX_storage_get_content(smx_storage_t storage); -const char* SIMIX_pre_storage_get_name(smx_simcall_t simcall, smx_storage_t storage); -const char* SIMIX_pre_storage_get_host(smx_simcall_t simcall, smx_storage_t storage); +const char* simcall_HANDLER_storage_get_name(smx_simcall_t simcall, smx_storage_t storage); +const char* simcall_HANDLER_storage_get_host(smx_simcall_t simcall, smx_storage_t storage); void SIMIX_post_io(smx_action_t action); void SIMIX_io_destroy(smx_action_t action); void SIMIX_io_finish(smx_action_t action); -// pre prototypes - #endif diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index de52181c77..6e2e16f688 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -44,7 +44,7 @@ void SIMIX_network_exit(void) /* Rendez-Vous Points */ /******************************************************************************/ -smx_rdv_t SIMIX_pre_rdv_create(smx_simcall_t simcall, const char *name){ +smx_rdv_t simcall_HANDLER_rdv_create(smx_simcall_t simcall, const char *name){ return SIMIX_rdv_create(name); } smx_rdv_t SIMIX_rdv_create(const char *name) @@ -67,7 +67,7 @@ smx_rdv_t SIMIX_rdv_create(const char *name) return rdv; } -void SIMIX_pre_rdv_destroy(smx_simcall_t simcall, smx_rdv_t rdv){ +void simcall_HANDLER_rdv_destroy(smx_simcall_t simcall, smx_rdv_t rdv){ return SIMIX_rdv_destroy(rdv); } void SIMIX_rdv_destroy(smx_rdv_t rdv) @@ -92,7 +92,7 @@ xbt_dict_t SIMIX_get_rdv_points() return rdv_points; } -smx_rdv_t SIMIX_pre_rdv_get_by_name(smx_simcall_t simcall, const char *name){ +smx_rdv_t simcall_HANDLER_rdv_get_by_name(smx_simcall_t simcall, const char *name){ return SIMIX_rdv_get_by_name(name); } smx_rdv_t SIMIX_rdv_get_by_name(const char *name) @@ -100,7 +100,7 @@ smx_rdv_t SIMIX_rdv_get_by_name(const char *name) return xbt_dict_get_or_null(rdv_points, name); } -int SIMIX_pre_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host){ +int simcall_HANDLER_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host){ return SIMIX_rdv_comm_count_by_host(rdv, host); } int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) @@ -117,7 +117,7 @@ int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) return count; } -smx_action_t SIMIX_pre_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv){ +smx_action_t simcall_HANDLER_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv){ return SIMIX_rdv_get_head(rdv); } smx_action_t SIMIX_rdv_get_head(smx_rdv_t rdv) @@ -125,7 +125,7 @@ smx_action_t SIMIX_rdv_get_head(smx_rdv_t rdv) return xbt_fifo_get_item_content(xbt_fifo_get_first_item(rdv->comm_fifo)); } -smx_process_t SIMIX_pre_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv){ +smx_process_t simcall_HANDLER_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv){ return SIMIX_rdv_get_receiver(rdv); } /** @@ -138,7 +138,7 @@ smx_process_t SIMIX_rdv_get_receiver(smx_rdv_t rdv) return rdv->permanent_receiver; } -void SIMIX_pre_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv, +void simcall_HANDLER_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv, smx_process_t process){ SIMIX_rdv_set_receiver(rdv, process); } @@ -353,7 +353,7 @@ void SIMIX_comm_destroy_internal_actions(smx_action_t action) } } -void SIMIX_pre_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, +void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void *src_buff, size_t src_buff_size, int (*match_fun)(void *, void *,smx_action_t), @@ -363,9 +363,9 @@ void SIMIX_pre_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv src_buff, src_buff_size, match_fun, NULL, copy_data_fun, data, 0); SIMCALL_SET_MC_VALUE(simcall, 0); - SIMIX_pre_comm_wait(simcall, comm, timeout); + simcall_HANDLER_comm_wait(simcall, comm, timeout); } -smx_action_t SIMIX_pre_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, +smx_action_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void *src_buff, size_t src_buff_size, int (*match_fun)(void *, void *,smx_action_t), @@ -454,7 +454,7 @@ smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv, return (detached ? NULL : other_action); } -void SIMIX_pre_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv, +void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size, int (*match_fun)(void *, void *, smx_action_t), void (*copy_data_fun)(smx_action_t, void*, size_t), @@ -463,10 +463,10 @@ void SIMIX_pre_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv, smx_action_t comm = SIMIX_comm_irecv(simcall->issuer, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate); SIMCALL_SET_MC_VALUE(simcall, 0); - SIMIX_pre_comm_wait(simcall, comm, timeout); + simcall_HANDLER_comm_wait(simcall, comm, timeout); } -smx_action_t SIMIX_pre_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv, +smx_action_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size, int (*match_fun)(void *, void *, smx_action_t), void (*copy_data_fun)(smx_action_t, void*, size_t), @@ -564,7 +564,7 @@ smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv, return other_action; } -smx_action_t SIMIX_pre_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, +smx_action_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, int type, int src, int tag, int (*match_fun)(void *, void *, smx_action_t), void *data){ @@ -604,13 +604,13 @@ smx_action_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int type, return other_action; } -void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout) +void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout) { /* the simcall may be a wait, a send or a recv */ surf_action_t sleep; /* Associate this simcall to the wait action */ - XBT_DEBUG("SIMIX_pre_comm_wait, %p", action); + XBT_DEBUG("simcall_HANDLER_comm_wait, %p", action); xbt_fifo_push(action->simcalls, simcall); simcall->issuer->waiting_action = action; @@ -650,7 +650,7 @@ void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double time } } -void SIMIX_pre_comm_test(smx_simcall_t simcall, smx_action_t action) +void simcall_HANDLER_comm_test(smx_simcall_t simcall, smx_action_t action) { if(MC_is_active()){ simcall_comm_test__set__result(simcall, action->comm.src_proc && action->comm.dst_proc); @@ -673,7 +673,7 @@ void SIMIX_pre_comm_test(smx_simcall_t simcall, smx_action_t action) } } -void SIMIX_pre_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions) +void simcall_HANDLER_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions) { unsigned int cursor; smx_action_t action; @@ -704,7 +704,7 @@ void SIMIX_pre_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions) SIMIX_simcall_answer(simcall); } -void SIMIX_pre_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions) +void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions) { smx_action_t action; unsigned int cursor = 0; @@ -958,7 +958,7 @@ void SIMIX_post_comm(smx_action_t action) } } -void SIMIX_pre_comm_cancel(smx_simcall_t simcall, smx_action_t action){ +void simcall_HANDLER_comm_cancel(smx_simcall_t simcall, smx_action_t action){ SIMIX_comm_cancel(action); } void SIMIX_comm_cancel(smx_action_t action) @@ -995,7 +995,7 @@ void SIMIX_comm_resume(smx_action_t action) /************* Action Getters **************/ -double SIMIX_pre_comm_get_remains(smx_simcall_t simcall, smx_action_t action){ +double simcall_HANDLER_comm_get_remains(smx_simcall_t simcall, smx_action_t action){ return SIMIX_comm_get_remains(action); } /** @@ -1028,7 +1028,7 @@ double SIMIX_comm_get_remains(smx_action_t action) return remains; } -e_smx_state_t SIMIX_pre_comm_get_state(smx_simcall_t simcall, smx_action_t action){ +e_smx_state_t simcall_HANDLER_comm_get_state(smx_simcall_t simcall, smx_action_t action){ return SIMIX_comm_get_state(action); } e_smx_state_t SIMIX_comm_get_state(smx_action_t action) @@ -1036,7 +1036,7 @@ e_smx_state_t SIMIX_comm_get_state(smx_action_t action) return action->state; } -void* SIMIX_pre_comm_get_src_data(smx_simcall_t simcall, smx_action_t action){ +void* simcall_HANDLER_comm_get_src_data(smx_simcall_t simcall, smx_action_t action){ return SIMIX_comm_get_src_data(action); } /** @@ -1049,7 +1049,7 @@ void* SIMIX_comm_get_src_data(smx_action_t action) return action->comm.src_data; } -void* SIMIX_pre_comm_get_dst_data(smx_simcall_t simcall, smx_action_t action){ +void* simcall_HANDLER_comm_get_dst_data(smx_simcall_t simcall, smx_action_t action){ return SIMIX_comm_get_dst_data(action); } /** @@ -1062,7 +1062,7 @@ void* SIMIX_comm_get_dst_data(smx_action_t action) return action->comm.dst_data; } -smx_process_t SIMIX_pre_comm_get_src_proc(smx_simcall_t simcall, smx_action_t action){ +smx_process_t simcall_HANDLER_comm_get_src_proc(smx_simcall_t simcall, smx_action_t action){ return SIMIX_comm_get_src_proc(action); } smx_process_t SIMIX_comm_get_src_proc(smx_action_t action) @@ -1070,7 +1070,7 @@ smx_process_t SIMIX_comm_get_src_proc(smx_action_t action) return action->comm.src_proc; } -smx_process_t SIMIX_pre_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t action){ +smx_process_t simcall_HANDLER_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t action){ return SIMIX_comm_get_dst_proc(action); } smx_process_t SIMIX_comm_get_dst_proc(smx_action_t action) @@ -1079,7 +1079,7 @@ smx_process_t SIMIX_comm_get_dst_proc(smx_action_t action) } #ifdef HAVE_LATENCY_BOUND_TRACKING -int SIMIX_pre_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t action) +int simcall_HANDLER_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t action) { return SIMIX_comm_is_latency_bounded(action); } diff --git a/src/simix/smx_network_private.h b/src/simix/smx_network_private.h index a980644d1b..18e68c21a9 100644 --- a/src/simix/smx_network_private.h +++ b/src/simix/smx_network_private.h @@ -51,11 +51,11 @@ void SIMIX_comm_destroy(smx_action_t action); void SIMIX_comm_destroy_internal_actions(smx_action_t action); smx_action_t SIMIX_comm_iprobe(smx_process_t dst_proc, smx_rdv_t rdv, int type, int src, int tag, int (*match_fun)(void *, void *, smx_action_t), void *data); -void SIMIX_pre_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout); -void SIMIX_pre_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions); +void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_action_t action, double timeout); +void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t actions); void SIMIX_post_comm(smx_action_t action); -void SIMIX_pre_comm_test(smx_simcall_t simcall, smx_action_t action); -void SIMIX_pre_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions); +void simcall_HANDLER_comm_test(smx_simcall_t simcall, smx_action_t action); +void simcall_HANDLER_comm_testany(smx_simcall_t simcall, xbt_dynar_t actions); void SIMIX_comm_cancel(smx_action_t action); double SIMIX_comm_get_remains(smx_action_t action); e_smx_state_t SIMIX_comm_get_state(smx_action_t action); @@ -64,51 +64,51 @@ void SIMIX_comm_resume(smx_action_t action); smx_process_t SIMIX_comm_get_src_proc(smx_action_t action); smx_process_t SIMIX_comm_get_dst_proc(smx_action_t action); -// pre prototypes -smx_action_t SIMIX_pre_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, +// handlers' prototypes +smx_action_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, int type,int src, int tag, int (*match_fun)(void *, void *, smx_action_t), void *data); -smx_rdv_t SIMIX_pre_rdv_create(smx_simcall_t simcall, const char *name); -void SIMIX_pre_rdv_destroy(smx_simcall_t simcall, smx_rdv_t rdv); -smx_rdv_t SIMIX_pre_rdv_get_by_name(smx_simcall_t simcall, const char *name); -int SIMIX_pre_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host); -smx_action_t SIMIX_pre_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv); -smx_process_t SIMIX_pre_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv); -void SIMIX_pre_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv, +smx_rdv_t simcall_HANDLER_rdv_create(smx_simcall_t simcall, const char *name); +void simcall_HANDLER_rdv_destroy(smx_simcall_t simcall, smx_rdv_t rdv); +smx_rdv_t simcall_HANDLER_rdv_get_by_name(smx_simcall_t simcall, const char *name); +int simcall_HANDLER_rdv_comm_count_by_host(smx_simcall_t simcall, smx_rdv_t rdv, smx_host_t host); +smx_action_t simcall_HANDLER_rdv_get_head(smx_simcall_t simcall, smx_rdv_t rdv); +smx_process_t simcall_HANDLER_rdv_get_receiver(smx_simcall_t simcall, smx_rdv_t rdv); +void simcall_HANDLER_rdv_set_receiver(smx_simcall_t simcall, smx_rdv_t rdv, smx_process_t process); -void SIMIX_pre_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, +void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void *src_buff, size_t src_buff_size, int (*match_fun)(void *, void *,smx_action_t), void (*copy_data_fun)(smx_action_t, void*, size_t), void *data, double timeout); -smx_action_t SIMIX_pre_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, +smx_action_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void *src_buff, size_t src_buff_size, int (*match_fun)(void *, void *,smx_action_t), void (*clean_fun)(void *), void (*copy_data_fun)(smx_action_t, void*, size_t), void *data, int detached); -void SIMIX_pre_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv, +void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size, int (*match_fun)(void *, void *, smx_action_t), void (*copy_data_fun)(smx_action_t, void*, size_t), void *data, double timeout, double rate); -smx_action_t SIMIX_pre_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv, +smx_action_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size, int (*match_fun)(void *, void *, smx_action_t), void (*copy_data_fun)(smx_action_t, void*, size_t), void *data, double rate); -void SIMIX_pre_comm_cancel(smx_simcall_t simcall, smx_action_t action); -double SIMIX_pre_comm_get_remains(smx_simcall_t simcall, smx_action_t action); -e_smx_state_t SIMIX_pre_comm_get_state(smx_simcall_t simcall, smx_action_t action); -void* SIMIX_pre_comm_get_src_data(smx_simcall_t simcall, smx_action_t action); -void* SIMIX_pre_comm_get_dst_data(smx_simcall_t simcall, smx_action_t action); -smx_process_t SIMIX_pre_comm_get_src_proc(smx_simcall_t simcall, smx_action_t action); -smx_process_t SIMIX_pre_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t action); +void simcall_HANDLER_comm_cancel(smx_simcall_t simcall, smx_action_t action); +double simcall_HANDLER_comm_get_remains(smx_simcall_t simcall, smx_action_t action); +e_smx_state_t simcall_HANDLER_comm_get_state(smx_simcall_t simcall, smx_action_t action); +void* simcall_HANDLER_comm_get_src_data(smx_simcall_t simcall, smx_action_t action); +void* simcall_HANDLER_comm_get_dst_data(smx_simcall_t simcall, smx_action_t action); +smx_process_t simcall_HANDLER_comm_get_src_proc(smx_simcall_t simcall, smx_action_t action); +smx_process_t simcall_HANDLER_comm_get_dst_proc(smx_simcall_t simcall, smx_action_t action); #ifdef HAVE_LATENCY_BOUND_TRACKING -int SIMIX_pre_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t action); +int simcall_HANDLER_comm_is_latency_bounded(smx_simcall_t simcall, smx_action_t action); #endif #endif diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index ddc96427bf..30ff57c592 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -38,7 +38,7 @@ int SIMIX_process_has_pending_comms(smx_process_t process) { return xbt_fifo_size(process->comms) > 0; } -void SIMIX_pre_process_cleanup(smx_simcall_t simcall, smx_process_t process) { +void simcall_HANDLER_process_cleanup(smx_simcall_t simcall, smx_process_t process) { SIMIX_process_cleanup(process); } /** @@ -189,7 +189,7 @@ smx_process_t SIMIX_process_create_from_wrapper(smx_process_arg_t args) { } -void SIMIX_pre_process_create(smx_simcall_t simcall, +void simcall_HANDLER_process_create(smx_simcall_t simcall, smx_process_t *process, const char *name, xbt_main_func_t code, @@ -313,7 +313,7 @@ void SIMIX_process_runall(void) xbt_dynar_reset(simix_global->process_to_run); } -void SIMIX_pre_process_kill(smx_simcall_t simcall, smx_process_t process) { +void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_process_t process) { SIMIX_process_kill(process, simcall->issuer); } /** @@ -426,7 +426,7 @@ void SIMIX_process_throw(smx_process_t process, xbt_errcat_t cat, int value, con xbt_dynar_push_as(simix_global->process_to_run, smx_process_t, process); } -void SIMIX_pre_process_killall(smx_simcall_t simcall, int reset_pid) { +void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid) { SIMIX_process_killall(simcall->issuer, reset_pid); } /** @@ -451,7 +451,7 @@ void SIMIX_process_killall(smx_process_t issuer, int reset_pid) SIMIX_process_empty_trash(); } -void SIMIX_pre_process_change_host(smx_simcall_t simcall, smx_process_t process, +void simcall_HANDLER_process_change_host(smx_simcall_t simcall, smx_process_t process, smx_host_t dest) { process->new_host = dest; @@ -466,7 +466,7 @@ void SIMIX_process_change_host(smx_process_t process, } -void SIMIX_pre_process_suspend(smx_simcall_t simcall, smx_process_t process) +void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_process_t process) { smx_action_t action_suspend = SIMIX_process_suspend(process, simcall->issuer); @@ -532,7 +532,7 @@ smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer) } } -void SIMIX_pre_process_resume(smx_simcall_t simcall, smx_process_t process){ +void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_process_t process){ SIMIX_process_resume(process, simcall->issuer); } @@ -588,7 +588,7 @@ int SIMIX_process_get_maxpid(void) { return simix_process_maxpid; } -int SIMIX_pre_process_count(smx_simcall_t simcall){ +int simcall_HANDLER_process_count(smx_simcall_t simcall){ return SIMIX_process_count(); } int SIMIX_process_count(void) @@ -596,7 +596,7 @@ int SIMIX_process_count(void) return xbt_swag_size(simix_global->process_list); } -int SIMIX_pre_process_get_PID(smx_simcall_t simcall, smx_process_t self){ +int simcall_HANDLER_process_get_PID(smx_simcall_t simcall, smx_process_t self){ return SIMIX_process_get_PID(self); } @@ -607,7 +607,7 @@ int SIMIX_process_get_PID(smx_process_t self){ return self->pid; } -int SIMIX_pre_process_get_PPID(smx_simcall_t simcall, smx_process_t self){ +int simcall_HANDLER_process_get_PPID(smx_simcall_t simcall, smx_process_t self){ return SIMIX_process_get_PPID(self); } @@ -618,7 +618,7 @@ int SIMIX_process_get_PPID(smx_process_t self){ return self->ppid; } -void* SIMIX_pre_process_self_get_data(smx_simcall_t simcall, smx_process_t self){ +void* simcall_HANDLER_process_self_get_data(smx_simcall_t simcall, smx_process_t self){ return SIMIX_process_self_get_data(self); } @@ -632,7 +632,7 @@ void* SIMIX_process_self_get_data(smx_process_t self) return SIMIX_process_get_data(self); } -void SIMIX_pre_process_set_data(smx_simcall_t simcall, smx_process_t process, +void simcall_HANDLER_process_set_data(smx_simcall_t simcall, smx_process_t process, void *data){ SIMIX_process_set_data(process, data); } @@ -643,7 +643,7 @@ void SIMIX_process_self_set_data(smx_process_t self, void *data) SIMIX_process_set_data(self, data); } -void* SIMIX_pre_process_get_data(smx_simcall_t simcall, smx_process_t process){ +void* simcall_HANDLER_process_get_data(smx_simcall_t simcall, smx_process_t process){ return SIMIX_process_get_data(process); } void* SIMIX_process_get_data(smx_process_t process) @@ -656,7 +656,7 @@ void SIMIX_process_set_data(smx_process_t process, void *data) process->data = data; } -smx_host_t SIMIX_pre_process_get_host(smx_simcall_t simcall, smx_process_t process){ +smx_host_t simcall_HANDLER_process_get_host(smx_simcall_t simcall, smx_process_t process){ return SIMIX_process_get_host(process); } smx_host_t SIMIX_process_get_host(smx_process_t process) @@ -675,7 +675,7 @@ const char* SIMIX_process_self_get_name(void) { return SIMIX_process_get_name(process); } -const char* SIMIX_pre_process_get_name(smx_simcall_t simcall, smx_process_t process) { +const char* simcall_HANDLER_process_get_name(smx_simcall_t simcall, smx_process_t process) { return SIMIX_process_get_name(process); } const char* SIMIX_process_get_name(smx_process_t process) @@ -695,7 +695,7 @@ smx_process_t SIMIX_process_get_by_name(const char* name) return NULL; } -int SIMIX_pre_process_is_suspended(smx_simcall_t simcall, smx_process_t process){ +int simcall_HANDLER_process_is_suspended(smx_simcall_t simcall, smx_process_t process){ return SIMIX_process_is_suspended(process); } int SIMIX_process_is_suspended(smx_process_t process) @@ -703,7 +703,7 @@ int SIMIX_process_is_suspended(smx_process_t process) return process->suspended; } -xbt_dict_t SIMIX_pre_process_get_properties(smx_simcall_t simcall, smx_process_t process){ +xbt_dict_t simcall_HANDLER_process_get_properties(smx_simcall_t simcall, smx_process_t process){ return SIMIX_process_get_properties(process); } xbt_dict_t SIMIX_process_get_properties(smx_process_t process) @@ -711,7 +711,7 @@ xbt_dict_t SIMIX_process_get_properties(smx_process_t process) return process->properties; } -void SIMIX_pre_process_join(smx_simcall_t simcall, smx_process_t process, double timeout) +void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout) { smx_action_t action = SIMIX_process_join(simcall->issuer, process, timeout); xbt_fifo_push(action->simcalls, simcall); @@ -729,7 +729,7 @@ static int SIMIX_process_join_finish(smx_process_exit_status_t status, smx_actio if (simcall->issuer->suspended) { XBT_DEBUG("Wait! This process is suspended and can't wake up now."); simcall->issuer->suspended = 0; - SIMIX_pre_process_suspend(simcall, simcall->issuer); + simcall_HANDLER_process_suspend(simcall, simcall->issuer); } else { SIMIX_simcall_answer(simcall); } @@ -749,7 +749,7 @@ smx_action_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, dou return res; } -void SIMIX_pre_process_sleep(smx_simcall_t simcall, double duration) +void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration) { if (MC_is_active()) { MC_process_clock_add(simcall->issuer, duration); @@ -821,7 +821,7 @@ void SIMIX_post_process_sleep(smx_action_t action) if (simcall->issuer->suspended) { XBT_DEBUG("Wait! This process is suspended and can't wake up now."); simcall->issuer->suspended = 0; - SIMIX_pre_process_suspend(simcall, simcall->issuer); + simcall_HANDLER_process_suspend(simcall, simcall->issuer); } else { SIMIX_simcall_answer(simcall); } @@ -963,7 +963,7 @@ void SIMIX_process_on_exit_runall(smx_process_t process) { } } -void SIMIX_pre_process_on_exit(smx_simcall_t simcall, smx_process_t process, +void simcall_HANDLER_process_on_exit(smx_simcall_t simcall, smx_process_t process, int_f_pvoid_pvoid_t fun, void *data) { SIMIX_process_on_exit(process, fun, data); } @@ -980,7 +980,7 @@ void SIMIX_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void xbt_dynar_push_as(process->on_exit,s_smx_process_exit_fun_t,exit_fun); } -void SIMIX_pre_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process, +void simcall_HANDLER_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process, int auto_restart) { SIMIX_process_auto_restart_set(process, auto_restart); } @@ -993,7 +993,7 @@ void SIMIX_process_auto_restart_set(smx_process_t process, int auto_restart) { process->auto_restart = auto_restart; } -smx_process_t SIMIX_pre_process_restart(smx_simcall_t simcall, smx_process_t process) { +smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process_t process) { return SIMIX_process_restart(process, simcall->issuer); } /** diff --git a/src/simix/smx_process_private.h b/src/simix/smx_process_private.h index c07ac3ced0..246b37b01a 100644 --- a/src/simix/smx_process_private.h +++ b/src/simix/smx_process_private.h @@ -84,11 +84,11 @@ void SIMIX_process_empty_trash(void); void SIMIX_process_yield(smx_process_t self); xbt_running_ctx_t *SIMIX_process_get_running_context(void); void SIMIX_process_exception_terminate(xbt_ex_t * e); -void SIMIX_pre_process_change_host(smx_simcall_t, smx_process_t process, +void simcall_HANDLER_process_change_host(smx_simcall_t, smx_process_t process, smx_host_t dest); void SIMIX_process_change_host(smx_process_t process, smx_host_t dest); -void SIMIX_pre_process_suspend(smx_simcall_t simcall, smx_process_t process); +void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_process_t process); smx_action_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer); void SIMIX_process_resume(smx_process_t process, smx_process_t issuer); int SIMIX_process_get_PID(smx_process_t self); @@ -100,9 +100,9 @@ const char* SIMIX_process_get_name(smx_process_t process); smx_process_t SIMIX_process_get_by_name(const char* name); int SIMIX_process_is_suspended(smx_process_t process); xbt_dict_t SIMIX_process_get_properties(smx_process_t process); -void SIMIX_pre_process_join(smx_simcall_t simcall, smx_process_t process, double timeout); +void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout); smx_action_t SIMIX_process_join(smx_process_t issuer, smx_process_t process, double timeout); -void SIMIX_pre_process_sleep(smx_simcall_t simcall, double duration); +void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration); smx_action_t SIMIX_process_sleep(smx_process_t process, double duration); void SIMIX_post_process_sleep(smx_action_t action); @@ -112,31 +112,31 @@ void SIMIX_process_sleep_destroy(smx_action_t action); void SIMIX_process_auto_restart_set(smx_process_t process, int auto_restart); smx_process_t SIMIX_process_restart(smx_process_t process, smx_process_t issuer); -// pre prototypes -void SIMIX_pre_process_create(smx_simcall_t simcall, smx_process_t *process, +// handlers' prototypes +void simcall_HANDLER_process_create(smx_simcall_t simcall, smx_process_t *process, const char *name, xbt_main_func_t code, void *data, const char *hostname, double kill_time, int argc, char **argv, xbt_dict_t properties, int auto_restart); -void SIMIX_pre_process_kill(smx_simcall_t simcall, smx_process_t process); -void SIMIX_pre_process_killall(smx_simcall_t simcall, int reset_pid); -void SIMIX_pre_process_cleanup(smx_simcall_t simcall, smx_process_t process); -void SIMIX_pre_process_resume(smx_simcall_t simcall, smx_process_t process); -int SIMIX_pre_process_count(smx_simcall_t simcall); -void* SIMIX_pre_process_self_get_data(smx_simcall_t simcall, smx_process_t process); -int SIMIX_pre_process_get_PID(smx_simcall_t simcall, smx_process_t self); -int SIMIX_pre_process_get_PPID(smx_simcall_t simcall, smx_process_t self); -void* SIMIX_pre_process_get_data(smx_simcall_t simcall, smx_process_t process); -void SIMIX_pre_process_set_data(smx_simcall_t simcall, smx_process_t process, +void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_process_t process); +void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid); +void simcall_HANDLER_process_cleanup(smx_simcall_t simcall, smx_process_t process); +void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_process_t process); +int simcall_HANDLER_process_count(smx_simcall_t simcall); +void* simcall_HANDLER_process_self_get_data(smx_simcall_t simcall, smx_process_t process); +int simcall_HANDLER_process_get_PID(smx_simcall_t simcall, smx_process_t self); +int simcall_HANDLER_process_get_PPID(smx_simcall_t simcall, smx_process_t self); +void* simcall_HANDLER_process_get_data(smx_simcall_t simcall, smx_process_t process); +void simcall_HANDLER_process_set_data(smx_simcall_t simcall, smx_process_t process, void *data); -smx_host_t SIMIX_pre_process_get_host(smx_simcall_t simcall, smx_process_t process); -const char* SIMIX_pre_process_get_name(smx_simcall_t simcall, smx_process_t process); -int SIMIX_pre_process_is_suspended(smx_simcall_t simcall, smx_process_t process); -xbt_dict_t SIMIX_pre_process_get_properties(smx_simcall_t simcall, smx_process_t process); -void SIMIX_pre_process_on_exit(smx_simcall_t simcall, smx_process_t process, +smx_host_t simcall_HANDLER_process_get_host(smx_simcall_t simcall, smx_process_t process); +const char* simcall_HANDLER_process_get_name(smx_simcall_t simcall, smx_process_t process); +int simcall_HANDLER_process_is_suspended(smx_simcall_t simcall, smx_process_t process); +xbt_dict_t simcall_HANDLER_process_get_properties(smx_simcall_t simcall, smx_process_t process); +void simcall_HANDLER_process_on_exit(smx_simcall_t simcall, smx_process_t process, int_f_pvoid_pvoid_t fun, void *data); -void SIMIX_pre_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process, +void simcall_HANDLER_process_auto_restart_set(smx_simcall_t simcall, smx_process_t process, int auto_restart); -smx_process_t SIMIX_pre_process_restart(smx_simcall_t simcall, smx_process_t process); +smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process_t process); SG_END_DECL() diff --git a/src/simix/smx_synchro.c b/src/simix/smx_synchro.c index 22e718069d..d2028e8f66 100644 --- a/src/simix/smx_synchro.c +++ b/src/simix/smx_synchro.c @@ -120,7 +120,7 @@ static void SIMIX_synchro_finish(smx_action_t action) } /*********************************** Mutex ************************************/ -smx_mutex_t SIMIX_pre_mutex_init(smx_simcall_t simcall){ +smx_mutex_t simcall_HANDLER_mutex_init(smx_simcall_t simcall){ return SIMIX_mutex_init(); } /** @@ -145,7 +145,7 @@ smx_mutex_t SIMIX_mutex_init(void) * \brief Handles a mutex lock simcall. * \param simcall the simcall */ -void SIMIX_pre_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex) +void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex) { XBT_IN("(%p)",simcall); /* FIXME: check where to validate the arguments */ @@ -168,7 +168,7 @@ void SIMIX_pre_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex) XBT_OUT(); } -int SIMIX_pre_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex){ +int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex){ return SIMIX_mutex_trylock(mutex, simcall->issuer); } /** @@ -194,7 +194,7 @@ int SIMIX_mutex_trylock(smx_mutex_t mutex, smx_process_t issuer) return 1; } -void SIMIX_pre_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex){ +void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex){ SIMIX_mutex_unlock(mutex, simcall->issuer); } /** @@ -231,7 +231,7 @@ void SIMIX_mutex_unlock(smx_mutex_t mutex, smx_process_t issuer) XBT_OUT(); } -void SIMIX_pre_mutex_destroy(smx_simcall_t simcall, smx_mutex_t mutex){ +void simcall_HANDLER_mutex_destroy(smx_simcall_t simcall, smx_mutex_t mutex){ SIMIX_mutex_destroy(mutex); } /** @@ -252,7 +252,7 @@ void SIMIX_mutex_destroy(smx_mutex_t mutex) /********************************* Condition **********************************/ -smx_cond_t SIMIX_pre_cond_init(smx_simcall_t simcall){ +smx_cond_t simcall_HANDLER_cond_init(smx_simcall_t simcall){ return SIMIX_cond_init(); } /** @@ -277,7 +277,7 @@ smx_cond_t SIMIX_cond_init(void) * \brief Handle a condition waiting simcall without timeouts * \param simcall the simcall */ -void SIMIX_pre_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex) +void simcall_HANDLER_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex) { XBT_IN("(%p)",simcall); smx_process_t issuer = simcall->issuer; @@ -290,7 +290,7 @@ void SIMIX_pre_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mut * \brief Handle a condition waiting simcall with timeouts * \param simcall the simcall */ -void SIMIX_pre_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond, +void simcall_HANDLER_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex, double timeout) { XBT_IN("(%p)",simcall); @@ -323,7 +323,7 @@ static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout, XBT_OUT(); } -void SIMIX_pre_cond_signal(smx_simcall_t simcall, smx_cond_t cond){ +void simcall_HANDLER_cond_signal(smx_simcall_t simcall, smx_cond_t cond){ SIMIX_cond_signal(cond); } /** @@ -358,12 +358,12 @@ void SIMIX_cond_signal(smx_cond_t cond) mutex = simcall_cond_wait_timeout__get__mutex(simcall); simcall->call = SIMCALL_MUTEX_LOCK; - SIMIX_pre_mutex_lock(simcall, mutex); + simcall_HANDLER_mutex_lock(simcall, mutex); } XBT_OUT(); } -void SIMIX_pre_cond_broadcast(smx_simcall_t simcall, smx_cond_t cond){ +void simcall_HANDLER_cond_broadcast(smx_simcall_t simcall, smx_cond_t cond){ SIMIX_cond_broadcast(cond); } /** @@ -385,7 +385,7 @@ void SIMIX_cond_broadcast(smx_cond_t cond) XBT_OUT(); } -void SIMIX_pre_cond_destroy(smx_simcall_t simcall, smx_cond_t cond){ +void simcall_HANDLER_cond_destroy(smx_simcall_t simcall, smx_cond_t cond){ SIMIX_cond_destroy(cond); } /** @@ -411,7 +411,7 @@ void SIMIX_cond_destroy(smx_cond_t cond) /******************************** Semaphores **********************************/ #define SMX_SEM_NOLIMIT 99999 -smx_sem_t SIMIX_pre_sem_init(smx_simcall_t simcall, unsigned int value){ +smx_sem_t simcall_HANDLER_sem_init(smx_simcall_t simcall, unsigned int value){ return SIMIX_sem_init(value); } /** @brief Initialize a semaphore */ @@ -427,7 +427,7 @@ smx_sem_t SIMIX_sem_init(unsigned int value) return sem; } -void SIMIX_pre_sem_destroy(smx_simcall_t simcall, smx_sem_t sem){ +void simcall_HANDLER_sem_destroy(smx_simcall_t simcall, smx_sem_t sem){ SIMIX_sem_destroy(sem); } /** @brief Destroys a semaphore */ @@ -444,7 +444,7 @@ void SIMIX_sem_destroy(smx_sem_t sem) XBT_OUT(); } -void SIMIX_pre_sem_release(smx_simcall_t simcall, smx_sem_t sem){ +void simcall_HANDLER_sem_release(smx_simcall_t simcall, smx_sem_t sem){ SIMIX_sem_release(sem); } /** @brief release the semaphore @@ -476,7 +476,7 @@ int SIMIX_sem_would_block(smx_sem_t sem) return (sem->value <= 0); } -int SIMIX_pre_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem){ +int simcall_HANDLER_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem){ return SIMIX_sem_get_capacity(sem); } /** @brief Returns the current capacity of the semaphore */ @@ -510,7 +510,7 @@ static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer, * \brief Handles a sem acquire simcall without timeout. * \param simcall the simcall */ -void SIMIX_pre_sem_acquire(smx_simcall_t simcall, smx_sem_t sem) +void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem) { XBT_IN("(%p)",simcall); _SIMIX_sem_wait(sem, -1, simcall->issuer, simcall); @@ -521,7 +521,7 @@ void SIMIX_pre_sem_acquire(smx_simcall_t simcall, smx_sem_t sem) * \brief Handles a sem acquire simcall with timeout. * \param simcall the simcall */ -void SIMIX_pre_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout) +void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout) { XBT_IN("(%p)",simcall); _SIMIX_sem_wait(sem, timeout, simcall->issuer, simcall); diff --git a/src/simix/smx_synchro_private.h b/src/simix/smx_synchro_private.h index ad411fdf73..42af51dad5 100644 --- a/src/simix/smx_synchro_private.h +++ b/src/simix/smx_synchro_private.h @@ -32,15 +32,15 @@ void SIMIX_synchro_destroy(smx_action_t action); smx_mutex_t SIMIX_mutex_init(void); void SIMIX_mutex_destroy(smx_mutex_t mutex); -void SIMIX_pre_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex); +void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex); int SIMIX_mutex_trylock(smx_mutex_t mutex, smx_process_t issuer); void SIMIX_mutex_unlock(smx_mutex_t mutex, smx_process_t issuer); smx_cond_t SIMIX_cond_init(void); void SIMIX_cond_destroy(smx_cond_t cond); void SIMIX_cond_signal(smx_cond_t cond); -void SIMIX_pre_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex); -void SIMIX_pre_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond, +void simcall_HANDLER_cond_wait(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex); +void simcall_HANDLER_cond_wait_timeout(smx_simcall_t simcall, smx_cond_t cond, smx_mutex_t mutex, double timeout); void SIMIX_cond_broadcast(smx_cond_t cond); @@ -48,26 +48,26 @@ smx_sem_t SIMIX_sem_init(unsigned int value); void SIMIX_sem_destroy(smx_sem_t sem); void SIMIX_sem_release(smx_sem_t sem); int SIMIX_sem_would_block(smx_sem_t sem); -void SIMIX_pre_sem_acquire(smx_simcall_t simcall, smx_sem_t sem); -void SIMIX_pre_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout); +void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem); +void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout); int SIMIX_sem_get_capacity(smx_sem_t sem); -// pre prototypes -smx_mutex_t SIMIX_pre_mutex_init(smx_simcall_t simcall); -void SIMIX_pre_mutex_destroy(smx_simcall_t simcall, smx_mutex_t mutex); -int SIMIX_pre_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex); -void SIMIX_pre_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex); -smx_cond_t SIMIX_pre_cond_init(smx_simcall_t simcall); -void SIMIX_pre_cond_destroy(smx_simcall_t simcall, smx_cond_t cond); -void SIMIX_pre_cond_signal(smx_simcall_t simcall, smx_cond_t cond); -void SIMIX_pre_cond_broadcast(smx_simcall_t simcall, smx_cond_t cond); -smx_sem_t SIMIX_pre_sem_init(smx_simcall_t simcall, unsigned int value); -void SIMIX_pre_sem_destroy(smx_simcall_t simcall, smx_sem_t sem); -void SIMIX_pre_sem_release(smx_simcall_t simcall, smx_sem_t sem); -static XBT_INLINE int SIMIX_pre_sem_would_block(smx_simcall_t simcall, +// handlers prototypes +smx_mutex_t simcall_HANDLER_mutex_init(smx_simcall_t simcall); +void simcall_HANDLER_mutex_destroy(smx_simcall_t simcall, smx_mutex_t mutex); +int simcall_HANDLER_mutex_trylock(smx_simcall_t simcall, smx_mutex_t mutex); +void simcall_HANDLER_mutex_unlock(smx_simcall_t simcall, smx_mutex_t mutex); +smx_cond_t simcall_HANDLER_cond_init(smx_simcall_t simcall); +void simcall_HANDLER_cond_destroy(smx_simcall_t simcall, smx_cond_t cond); +void simcall_HANDLER_cond_signal(smx_simcall_t simcall, smx_cond_t cond); +void simcall_HANDLER_cond_broadcast(smx_simcall_t simcall, smx_cond_t cond); +smx_sem_t simcall_HANDLER_sem_init(smx_simcall_t simcall, unsigned int value); +void simcall_HANDLER_sem_destroy(smx_simcall_t simcall, smx_sem_t sem); +void simcall_HANDLER_sem_release(smx_simcall_t simcall, smx_sem_t sem); +static XBT_INLINE int simcall_HANDLER_sem_would_block(smx_simcall_t simcall, smx_sem_t sem) { return SIMIX_sem_would_block(sem); } -int SIMIX_pre_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem); +int simcall_HANDLER_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem); #endif diff --git a/src/simix/smx_vm.c b/src/simix/smx_vm.c index d91b857b7d..9dcd99d4ce 100644 --- a/src/simix/smx_vm.c +++ b/src/simix/smx_vm.c @@ -34,7 +34,7 @@ smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host) } -smx_host_t SIMIX_pre_vm_create(smx_simcall_t simcall, const char *name, smx_host_t ind_phys_host) +smx_host_t simcall_HANDLER_vm_create(smx_simcall_t simcall, const char *name, smx_host_t ind_phys_host) { return SIMIX_vm_create(name, ind_phys_host); } @@ -104,7 +104,7 @@ void SIMIX_vm_start(smx_host_t ind_vm) -void SIMIX_pre_vm_start(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_start(smx_simcall_t simcall, smx_host_t ind_vm) { SIMIX_vm_start(ind_vm); } @@ -114,7 +114,7 @@ int SIMIX_vm_get_state(smx_host_t ind_vm) return surf_resource_get_state(surf_workstation_resource_priv(ind_vm)); } -int SIMIX_pre_vm_get_state(smx_simcall_t simcall, smx_host_t ind_vm) +int simcall_HANDLER_vm_get_state(smx_simcall_t simcall, smx_host_t ind_vm) { return SIMIX_vm_get_state(ind_vm); } @@ -134,7 +134,7 @@ void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) surf_vm_workstation_migrate(ind_vm, ind_dst_pm); } -void SIMIX_pre_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm) +void simcall_HANDLER_vm_migrate(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_dst_pm) { SIMIX_vm_migrate(ind_vm, ind_dst_pm); } @@ -151,7 +151,7 @@ void *SIMIX_vm_get_pm(smx_host_t ind_vm) return surf_vm_workstation_get_pm(ind_vm); } -void *SIMIX_pre_vm_get_pm(smx_simcall_t simcall, smx_host_t ind_vm) +void *simcall_HANDLER_vm_get_pm(smx_simcall_t simcall, smx_host_t ind_vm) { return SIMIX_vm_get_pm(ind_vm); } @@ -169,7 +169,7 @@ void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound) surf_vm_workstation_set_bound(ind_vm, bound); } -void SIMIX_pre_vm_set_bound(smx_simcall_t simcall, smx_host_t ind_vm, double bound) +void simcall_HANDLER_vm_set_bound(smx_simcall_t simcall, smx_host_t ind_vm, double bound) { SIMIX_vm_set_bound(ind_vm, bound); } @@ -191,7 +191,7 @@ void SIMIX_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long m surf_vm_workstation_set_affinity(ind_vm, ind_pm, mask); } -void SIMIX_pre_vm_set_affinity(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) +void simcall_HANDLER_vm_set_affinity(smx_simcall_t simcall, smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) { SIMIX_vm_set_affinity(ind_vm, ind_pm, mask); } @@ -225,7 +225,7 @@ void SIMIX_vm_suspend(smx_host_t ind_vm, smx_process_t issuer) XBT_DEBUG("suspend all processes on the VM done done"); } -void SIMIX_pre_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm) { if (simcall->issuer->smx_host == ind_vm) { XBT_ERROR("cannot suspend the VM where I run"); @@ -234,7 +234,7 @@ void SIMIX_pre_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm) SIMIX_vm_suspend(ind_vm, simcall->issuer); - XBT_DEBUG("SIMIX_pre_vm_suspend done"); + XBT_DEBUG("simcall_HANDLER_vm_suspend done"); } @@ -263,7 +263,7 @@ void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer) } } -void SIMIX_pre_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm) { SIMIX_vm_resume(ind_vm, simcall->issuer); } @@ -296,7 +296,7 @@ void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer) } } -void SIMIX_pre_vm_save(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_save(smx_simcall_t simcall, smx_host_t ind_vm) { SIMIX_vm_save(ind_vm, simcall->issuer); } @@ -327,7 +327,7 @@ void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer) } } -void SIMIX_pre_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm) { SIMIX_vm_restore(ind_vm, simcall->issuer); } @@ -361,7 +361,7 @@ void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer) (int)SURF_VM_STATE_CREATED); } -void SIMIX_pre_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm) { SIMIX_vm_shutdown(ind_vm, simcall->issuer); } @@ -388,7 +388,7 @@ void SIMIX_vm_destroy(smx_host_t ind_vm) surf_vm_workstation_destroy(ind_vm); } -void SIMIX_pre_vm_destroy(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_destroy(smx_simcall_t simcall, smx_host_t ind_vm) { SIMIX_vm_destroy(ind_vm); } -- 2.20.1