X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f9ff044971d62cc8e1e0f97a878816523f7687f5..40d11d18a39dec9aad7b4cdcd29be2802d6ad606:/src/simix/simcalls_generated_body.c diff --git a/src/simix/simcalls_generated_body.c b/src/simix/simcalls_generated_body.c index e84f731293..dec23eeec3 100644 --- a/src/simix/simcalls_generated_body.c +++ b/src/simix/simcalls_generated_body.c @@ -1,12 +1,19 @@ -/********************************************* - * File Generated by src/simix/simcalls.py * - * from src/simix/simcalls.in * - * Do not modify this file, add new simcalls * - * in src/simix/simcalls.in * - *********************************************/ +/**********************************************************************/ +/* File generated by src/simix/simcalls.py from src/simix/simcalls.in */ +/* */ +/* DO NOT EVER CHANGE THIS FILE */ +/* */ +/* change simcalls specification in src/simix/simcalls.in */ +/**********************************************************************/ - inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_BY_NAME; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -16,12 +23,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static const char* simcall_BODY_host_get_name(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_NAME; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -31,12 +44,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.cc; } - inline static void simcall_BODY_host_on(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_ON; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -46,12 +65,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_host_off(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_OFF; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -61,12 +86,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_PROPERTIES; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -76,12 +107,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static int simcall_BODY_host_get_core(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_CORE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -91,12 +128,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_PROCESS_LIST; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -106,12 +149,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static double simcall_BODY_host_get_speed(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_SPEED; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -121,12 +170,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.d; } - inline static double simcall_BODY_host_get_available_speed(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_AVAILABLE_SPEED; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -136,12 +191,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.d; } - inline static int simcall_BODY_host_get_state(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_STATE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -151,12 +212,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) { + +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); + /* 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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -166,12 +233,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.d; } - inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int pstate_index) { + +inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int pstate_index) { 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); + /* 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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -182,12 +255,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.d; } - inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_NB_PSTATES; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -197,12 +276,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) { + +inline static void simcall_BODY_host_set_power_peak_at(smx_host_t host, int pstate_index) { 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); + /* 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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -213,12 +298,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_CONSUMED_ENERGY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -228,12 +319,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.d; } - inline static smx_action_t simcall_BODY_host_execute(const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) { + +inline static smx_action_t simcall_BODY_host_execute(const char* name, smx_host_t host, double computation_amount, double priority, double bound, unsigned long affinity_mask) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_EXECUTE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -248,12 +345,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static smx_action_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate) { + +inline static smx_action_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* computation_amount, double* communication_amount, double amount, double rate) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_PARALLEL_EXECUTE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -269,12 +372,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_host_execution_destroy(smx_action_t execution) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_EXECUTION_DESTROY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -284,12 +393,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_host_execution_cancel(smx_action_t execution) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_EXECUTION_CANCEL; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -299,12 +414,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static double simcall_BODY_host_execution_get_remains(smx_action_t execution) { + +inline static double simcall_BODY_host_execution_get_remains(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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -314,12 +435,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.d; } - inline static int simcall_BODY_host_execution_get_state(smx_action_t execution) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_EXECUTION_GET_STATE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -329,12 +456,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static void simcall_BODY_host_execution_set_priority(smx_action_t execution, double priority) { + +inline static void simcall_BODY_host_execution_set_priority(smx_action_t execution, double priority) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_EXECUTION_SET_PRIORITY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -345,12 +478,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_host_execution_set_bound(smx_action_t execution, double bound) { + +inline static void simcall_BODY_host_execution_set_bound(smx_action_t execution, 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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -361,12 +500,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_host_execution_set_affinity(smx_action_t execution, smx_host_t ws, unsigned long mask) { + +inline static void simcall_BODY_host_execution_set_affinity(smx_action_t execution, smx_host_t ws, unsigned long mask) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_EXECUTION_SET_AFFINITY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -378,12 +523,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static int simcall_BODY_host_execution_wait(smx_action_t execution) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_EXECUTION_WAIT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -393,12 +544,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t host) { + +inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -408,12 +565,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) { + +inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -423,12 +586,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) { + +inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t params) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_GET_PARAMS; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -439,12 +608,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) { + +inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t params) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_HOST_SET_PARAMS; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -455,12 +630,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void* simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_CREATE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -471,12 +652,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_vm_start(smx_host_t ind_vm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_START; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -486,12 +673,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_GET_STATE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -501,12 +694,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) { + +inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -517,12 +716,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_GET_PM; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -532,12 +737,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_SET_BOUND; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -548,12 +759,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) { + +inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_SET_AFFINITY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -565,12 +782,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_DESTROY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -580,12 +803,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_SUSPEND; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -595,12 +824,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_RESUME; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -610,12 +845,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_SHUTDOWN; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -625,12 +866,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_vm_save(smx_host_t ind_vm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_SAVE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -640,12 +887,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_VM_RESTORE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -655,12 +908,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_process_create(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) { + +inline static void simcall_BODY_process_create(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) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_CREATE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -679,12 +938,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_process_kill(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_KILL; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -694,12 +959,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_process_killall(int reset_pid) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_KILLALL; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -709,12 +980,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_process_cleanup(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_CLEANUP; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -724,12 +1001,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) { + +inline static void simcall_BODY_process_change_host(smx_process_t process, smx_host_t dest) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_CHANGE_HOST; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -740,12 +1023,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_process_suspend(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_SUSPEND; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -755,12 +1044,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_process_resume(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_RESUME; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -770,12 +1065,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static int simcall_BODY_process_count() { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_COUNT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -785,12 +1086,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static int simcall_BODY_process_get_PID(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_GET_PID; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -800,12 +1107,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static int simcall_BODY_process_get_PPID(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_GET_PPID; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -815,12 +1128,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static void* simcall_BODY_process_get_data(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_GET_DATA; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -830,12 +1149,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) { + +inline static void simcall_BODY_process_set_data(smx_process_t process, void* data) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_SET_DATA; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -846,12 +1171,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_GET_HOST; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -861,12 +1192,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static const char* simcall_BODY_process_get_name(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_GET_NAME; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -876,12 +1213,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.cc; } - inline static int simcall_BODY_process_is_suspended(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_IS_SUSPENDED; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -891,12 +1234,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static xbt_dict_t simcall_BODY_process_get_properties(smx_process_t process) { + +inline static xbt_dict_t simcall_BODY_process_get_properties(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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -906,12 +1255,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static int simcall_BODY_process_join(smx_process_t process, double timeout) { + +inline static int simcall_BODY_process_join(smx_process_t process, 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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -922,12 +1277,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static int simcall_BODY_process_sleep(double duration) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_SLEEP; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -937,12 +1298,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) { + +inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_ON_EXIT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -954,12 +1321,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) { + +inline static void simcall_BODY_process_auto_restart_set(smx_process_t process, int auto_restart) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_AUTO_RESTART_SET; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -970,12 +1343,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static smx_process_t simcall_BODY_process_restart(smx_process_t process) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_PROCESS_RESTART; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -985,12 +1364,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static smx_rdv_t simcall_BODY_rdv_create(const char* name) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_RDV_CREATE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1000,12 +1385,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_RDV_DESTROY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1015,12 +1406,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) { + +inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, 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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1031,12 +1428,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.ui; } - inline static smx_action_t simcall_BODY_rdv_get_head(smx_rdv_t rdv) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_RDV_GET_HEAD; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1046,12 +1449,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) { + +inline static void simcall_BODY_rdv_set_receiver(smx_rdv_t rdv, smx_process_t receiver) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_RDV_SET_RECEIVER; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1062,12 +1471,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static smx_process_t simcall_BODY_rdv_get_receiver(smx_rdv_t rdv) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_RDV_GET_RECEIVER; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1077,31 +1492,44 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static smx_action_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int src, int tag, simix_match_func_t match_fun, void* data) { + +inline static smx_action_t simcall_BODY_comm_iprobe(smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_IPROBE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); self->simcall.args[0].dp = (void*) rdv; - self->simcall.args[1].i = (int) src; - self->simcall.args[2].i = (int) tag; - self->simcall.args[3].fp = (FPtr) match_fun; - self->simcall.args[4].dp = (void*) data; + self->simcall.args[1].i = (int) type; + self->simcall.args[2].i = (int) src; + self->simcall.args[3].i = (int) tag; + self->simcall.args[4].fp = (FPtr) match_fun; + self->simcall.args[5].dp = (void*) data; if (self != simix_global->maestro_process) { XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) { + +inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, 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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1120,12 +1548,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static smx_action_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) { + +inline static smx_action_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_ISEND; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1145,12 +1579,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) { + +inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_RECV; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1167,12 +1607,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) { + +inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_IRECV; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1188,12 +1634,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_comm_cancel(smx_action_t comm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_CANCEL; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1203,12 +1655,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static int simcall_BODY_comm_waitany(xbt_dynar_t comms) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_WAITANY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1218,12 +1676,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static void simcall_BODY_comm_wait(smx_action_t comm, double timeout) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_WAIT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1234,12 +1698,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static int simcall_BODY_comm_test(smx_action_t comm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_TEST; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1249,12 +1719,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static int simcall_BODY_comm_testany(xbt_dynar_t comms) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_TESTANY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1264,12 +1740,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static double simcall_BODY_comm_get_remains(smx_action_t comm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_GET_REMAINS; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1279,12 +1761,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.d; } - inline static int simcall_BODY_comm_get_state(smx_action_t comm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_GET_STATE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1294,12 +1782,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static void* simcall_BODY_comm_get_src_data(smx_action_t comm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_GET_SRC_DATA; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1309,12 +1803,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void* simcall_BODY_comm_get_dst_data(smx_action_t comm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_GET_DST_DATA; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1324,12 +1824,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static smx_process_t simcall_BODY_comm_get_src_proc(smx_action_t comm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_GET_SRC_PROC; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1339,12 +1845,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static smx_process_t simcall_BODY_comm_get_dst_proc(smx_action_t comm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_GET_DST_PROC; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1354,12 +1866,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static smx_mutex_t simcall_BODY_mutex_init() { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_MUTEX_INIT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1369,12 +1887,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_mutex_destroy(smx_mutex_t mutex) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_MUTEX_DESTROY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1384,12 +1908,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_mutex_lock(smx_mutex_t mutex) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_MUTEX_LOCK; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1399,12 +1929,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static int simcall_BODY_mutex_trylock(smx_mutex_t mutex) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_MUTEX_TRYLOCK; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1414,12 +1950,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static void simcall_BODY_mutex_unlock(smx_mutex_t mutex) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_MUTEX_UNLOCK; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1429,12 +1971,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static smx_cond_t simcall_BODY_cond_init() { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COND_INIT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1444,12 +1992,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_cond_destroy(smx_cond_t cond) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COND_DESTROY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1459,12 +2013,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_cond_signal(smx_cond_t cond) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COND_SIGNAL; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1474,12 +2034,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_cond_wait(smx_cond_t cond, smx_mutex_t mutex) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COND_WAIT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1490,12 +2056,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, double timeout) { + +inline static void simcall_BODY_cond_wait_timeout(smx_cond_t cond, smx_mutex_t mutex, 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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1507,12 +2079,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_cond_broadcast(smx_cond_t cond) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COND_BROADCAST; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1522,12 +2100,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static smx_sem_t simcall_BODY_sem_init(int capacity) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_SEM_INIT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1537,12 +2121,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static void simcall_BODY_sem_destroy(smx_sem_t sem) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_SEM_DESTROY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1552,12 +2142,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_sem_release(smx_sem_t sem) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_SEM_RELEASE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1567,12 +2163,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static int simcall_BODY_sem_would_block(smx_sem_t sem) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_SEM_WOULD_BLOCK; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1582,12 +2184,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static void simcall_BODY_sem_acquire(smx_sem_t sem) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_SEM_ACQUIRE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1597,12 +2205,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, double timeout) { + +inline static void simcall_BODY_sem_acquire_timeout(smx_sem_t sem, 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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1613,12 +2227,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } - inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_SEM_GET_CAPACITY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1628,12 +2248,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) { + +inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, 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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1645,12 +2271,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.sgsz; } - inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) { + +inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, 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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1662,12 +2294,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.sgsz; } - inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) { + +inline static smx_file_t simcall_BODY_file_open(const char* fullpath, 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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1678,12 +2316,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_FILE_CLOSE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1694,12 +2338,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static int simcall_BODY_file_unlink(smx_file_t fd, smx_host_t host) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_FILE_UNLINK; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1710,12 +2360,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_FILE_GET_SIZE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1725,12 +2381,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.sgsz; } - inline static sg_size_t simcall_BODY_file_tell(smx_file_t fd) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_FILE_TELL; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1740,12 +2402,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.sgsz; } - inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) { + +inline static int simcall_BODY_file_seek(smx_file_t fd, sg_offset_t offset, int origin) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_FILE_SEEK; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1757,12 +2425,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static xbt_dynar_t simcall_BODY_file_get_info(smx_file_t fd) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_FILE_GET_INFO; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1772,12 +2446,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_FILE_MOVE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1788,12 +2468,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1803,12 +2489,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.sgsz; } - inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1818,12 +2510,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.sgsz; } - inline static xbt_dict_t simcall_BODY_storage_get_properties(smx_storage_t storage) { + +inline static xbt_dict_t simcall_BODY_storage_get_properties(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_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; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1833,12 +2531,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_STORAGE_GET_CONTENT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1848,12 +2552,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_ASR_GET_PROPERTIES; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1863,13 +2573,19 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } #ifdef HAVE_LATENCY_BOUND_TRACKING - inline static int simcall_BODY_comm_is_latency_bounded(smx_action_t comm) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_COMM_IS_LATENCY_BOUNDED; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1879,15 +2595,21 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } #endif #ifdef HAVE_TRACING - inline static void simcall_BODY_set_category(smx_action_t action, const char* category) { + +inline static void simcall_BODY_set_category(smx_action_t action, const char* category) { 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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_SET_CATEGORY; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1898,15 +2620,21 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } } #endif #ifdef HAVE_MC - inline static void* simcall_BODY_mc_snapshot() { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_MC_SNAPSHOT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1916,12 +2644,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.dp; } - inline static int simcall_BODY_mc_compare_snapshots(void* s1, void* s2) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1932,12 +2666,18 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; } - inline static int simcall_BODY_mc_random(int min, int max) { + +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); + /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ + self->simcall.call = SIMCALL_MC_RANDOM; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); @@ -1948,7 +2688,7 @@ SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); SIMIX_process_yield(self); } else { - SIMIX_simcall_pre(&self->simcall, 0); + SIMIX_simcall_enter(&self->simcall, 0); } return self->simcall.result.i; }