From: Gabriel Corona Date: Mon, 4 Jan 2016 12:07:44 +0000 (+0100) Subject: [simix] Remove lots of simcalls, use run_kernel instead X-Git-Tag: v3_13~1349 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9c9ae73e2c241bfb6216affb974232dc726eba6b [simix] Remove lots of simcalls, use run_kernel instead We should be able to most of the "Func" and "Proc" simcalls without handler. Most getters can be done directly in the application process without kernel synchronization. --- diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 3569270bde..e4fd1a67fc 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -19,6 +19,9 @@ #include "xbt/ex.h" #include /* isfinite() */ #include "mc/mc.h" +#include "src/simix/smx_host_private.h" + +#include XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix); @@ -32,7 +35,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix); */ void simcall_host_on(sg_host_t host) { - simcall_BODY_host_on(host); + return simgrid::simix::kernel(std::bind(SIMIX_host_on, host)); } /** @@ -55,7 +58,7 @@ void simcall_host_off(sg_host_t host) */ xbt_dict_t simcall_host_get_properties(sg_host_t host) { - return simcall_BODY_host_get_properties(host); + return simgrid::simix::kernel(std::bind(SIMIX_host_get_properties, host)); } /** @@ -79,7 +82,7 @@ xbt_dict_t simcall_asr_get_properties(const char *name) */ xbt_swag_t simcall_host_get_process_list(sg_host_t host) { - return simcall_BODY_host_get_process_list(host); + return simgrid::simix::kernel(std::bind(SIMIX_host_get_process_list, host)); } /** @@ -91,7 +94,8 @@ xbt_swag_t simcall_host_get_process_list(sg_host_t host) */ double simcall_host_get_current_power_peak(sg_host_t host) { - return simcall_BODY_host_get_current_power_peak(host); + return simgrid::simix::kernel( + std::bind(SIMIX_host_get_current_power_peak, host)); } /** @@ -104,7 +108,8 @@ double simcall_host_get_current_power_peak(sg_host_t host) */ double simcall_host_get_power_peak_at(sg_host_t host, int pstate_index) { - return simcall_BODY_host_get_power_peak_at(host, pstate_index); + return simgrid::simix::kernel( + std::bind(SIMIX_host_get_power_peak_at, host, pstate_index)); } /** @@ -116,20 +121,26 @@ double simcall_host_get_power_peak_at(sg_host_t host, int pstate_index) */ void simcall_host_set_pstate(sg_host_t host, int pstate_index) { - simcall_BODY_host_set_pstate(host, pstate_index); + simgrid::simix::kernel( + std::bind(SIMIX_host_set_pstate, host, pstate_index)); } /** \ingroup simix_host_management * \brief Returns the amount of watt dissipated at the given pstate when the host is idling */ -double simcall_host_get_wattmin_at(msg_host_t host, int pstate){ - return simcall_BODY_host_get_wattmin_at(host, pstate); +double simcall_host_get_wattmin_at(msg_host_t host, int pstate) +{ + return simgrid::simix::kernel( + std::bind(SIMIX_host_get_wattmin_at, host, pstate)); } + /** \ingroup simix_host_management * \brief Returns the amount of watt dissipated at the given pstate when the host burns CPU at 100% */ -double simcall_host_get_wattmax_at(msg_host_t host, int pstate){ - return simcall_BODY_host_get_wattmax_at(host, pstate); +double simcall_host_get_wattmax_at(msg_host_t host, int pstate) +{ + return simgrid::simix::kernel( + std::bind(SIMIX_host_get_wattmax_at, host, pstate)); } @@ -314,8 +325,9 @@ e_smx_state_t simcall_process_execution_wait(smx_synchro_t execution) * * \return The host object of the VM */ -void* simcall_vm_create(const char *name, sg_host_t phys_host){ - return simcall_BODY_vm_create(name, phys_host); +void* simcall_vm_create(const char *name, sg_host_t phys_host) +{ + return simgrid::simix::kernel(std::bind(SIMIX_vm_create, name, phys_host)); } /** @@ -326,7 +338,7 @@ void* simcall_vm_create(const char *name, sg_host_t phys_host){ */ void simcall_vm_start(sg_host_t vm) { - simcall_BODY_vm_start(vm); + return simgrid::simix::kernel(std::bind(SIMIX_vm_start, vm)); } /** @@ -338,7 +350,7 @@ void simcall_vm_start(sg_host_t vm) */ int simcall_vm_get_state(sg_host_t vm) { - return simcall_BODY_vm_get_state(vm); + return simgrid::simix::kernel(std::bind(SIMIX_vm_get_state, vm)); } /** @@ -350,27 +362,27 @@ int simcall_vm_get_state(sg_host_t vm) */ void *simcall_vm_get_pm(sg_host_t vm) { - return simcall_BODY_vm_get_pm(vm); + return simgrid::simix::kernel(std::bind(SIMIX_vm_get_pm, vm)); } void simcall_vm_set_bound(sg_host_t vm, double bound) { - simcall_BODY_vm_set_bound(vm, bound); + simgrid::simix::kernel(std::bind(SIMIX_vm_set_bound, vm, bound)); } void simcall_vm_set_affinity(sg_host_t vm, sg_host_t pm, unsigned long mask) { - simcall_BODY_vm_set_affinity(vm, pm, mask); + simgrid::simix::kernel(std::bind(SIMIX_vm_set_affinity, vm, pm, mask)); } void simcall_host_get_params(sg_host_t vm, vm_params_t params) { - simcall_BODY_host_get_params(vm, params); + simgrid::simix::kernel(std::bind(SIMIX_host_get_params, vm, params)); } void simcall_host_set_params(sg_host_t vm, vm_params_t params) { - simcall_BODY_host_set_params(vm, params); + simgrid::simix::kernel(std::bind(SIMIX_host_set_params, vm, params)); } /** @@ -382,7 +394,7 @@ void simcall_host_set_params(sg_host_t vm, vm_params_t params) */ void simcall_vm_migrate(sg_host_t vm, sg_host_t host) { - simcall_BODY_vm_migrate(vm, host); + return simgrid::simix::kernel(std::bind(SIMIX_vm_migrate, vm, host)); } /** @@ -448,7 +460,7 @@ void simcall_vm_shutdown(sg_host_t vm) */ void simcall_vm_destroy(sg_host_t vm) { - simcall_BODY_vm_destroy(vm); + simgrid::simix::kernel(std::bind(SIMIX_vm_destroy, vm)); } /** @@ -467,7 +479,8 @@ void simcall_vm_destroy(sg_host_t vm) */ void simcall_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm) { - simcall_BODY_vm_migratefrom_resumeto(vm, src_pm, dst_pm); + simgrid::simix::kernel(std::bind( + SIMIX_vm_migratefrom_resumeto, vm, src_pm, dst_pm)); } /** @@ -590,7 +603,7 @@ void simcall_process_resume(smx_process_t process) */ int simcall_process_count(void) { - return simcall_BODY_process_count(); + return simgrid::simix::kernel(SIMIX_process_count); } /** @@ -601,12 +614,7 @@ int simcall_process_count(void) */ int simcall_process_get_PID(smx_process_t process) { - if (process == SIMIX_process_self()) { - /* avoid a simcall if this function is called by the process itself */ - return SIMIX_process_get_PID(process); - } - - return simcall_BODY_process_get_PID(process); + return SIMIX_process_get_PID(process); } /** @@ -617,12 +625,7 @@ int simcall_process_get_PID(smx_process_t process) */ int simcall_process_get_PPID(smx_process_t process) { - if (process == SIMIX_process_self()) { - /* avoid a simcall if this function is called by the process itself */ - return SIMIX_process_get_PPID(process); - } - - return simcall_BODY_process_get_PPID(process); + return SIMIX_process_get_PPID(process); } /** @@ -633,12 +636,7 @@ int simcall_process_get_PPID(smx_process_t process) */ void* simcall_process_get_data(smx_process_t process) { - if (process == SIMIX_process_self()) { - /* avoid a simcall if this function is called by the process itself */ - return SIMIX_process_get_data(process); - } - - return simcall_BODY_process_get_data(process); + return SIMIX_process_get_data(process); } /** @@ -651,13 +649,7 @@ void* simcall_process_get_data(smx_process_t process) */ void simcall_process_set_data(smx_process_t process, void *data) { - if (process == SIMIX_process_self()) { - /* avoid a simcall if this function is called by the process itself */ - SIMIX_process_self_set_data(process, data); - } - else { - simcall_BODY_process_set_data(process, data); - } + simgrid::simix::kernel(std::bind(SIMIX_process_set_data, process, data)); } static void kill_process(void* arg) @@ -699,7 +691,7 @@ double simcall_process_get_kill_time(smx_process_t process) { */ sg_host_t simcall_process_get_host(smx_process_t process) { - return simcall_BODY_process_get_host(process); + return SIMIX_process_get_host(process); } /** @@ -712,11 +704,7 @@ sg_host_t simcall_process_get_host(smx_process_t process) */ const char* simcall_process_get_name(smx_process_t process) { - if (process == SIMIX_process_self()) { - /* avoid a simcall if this function is called by the process itself */ - return process->name; - } - return simcall_BODY_process_get_name(process); + return SIMIX_process_get_name(process); } /** @@ -729,7 +717,7 @@ const char* simcall_process_get_name(smx_process_t process) */ int simcall_process_is_suspended(smx_process_t process) { - return simcall_BODY_process_is_suspended(process); + return simcall_BODY_process_is_suspended(process); } /** @@ -740,7 +728,7 @@ int simcall_process_is_suspended(smx_process_t process) */ xbt_dict_t simcall_process_get_properties(smx_process_t process) { - return simcall_BODY_process_get_properties(process); + return SIMIX_process_get_properties(process); } /** * \ingroup simix_process_management @@ -1365,7 +1353,9 @@ sg_size_t simcall_storage_get_used_size (smx_storage_t storage){ */ xbt_dict_t simcall_host_get_mounted_storage_list(sg_host_t host) { - return simcall_BODY_host_get_mounted_storage_list(host); + return simgrid::simix::kernel(std::bind( + SIMIX_host_get_mounted_storage_list, host + )); } /** @@ -1376,7 +1366,9 @@ xbt_dict_t simcall_host_get_mounted_storage_list(sg_host_t host) */ xbt_dynar_t simcall_host_get_attached_storage_list(sg_host_t host) { - return simcall_BODY_host_get_attached_storage_list(host); + return simgrid::simix::kernel(std::bind( + SIMIX_host_get_attached_storage_list, host + )); } /** diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index 523515a190..cb9bc3904d 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -14,13 +14,6 @@ */ -static inline sg_host_t simcall_host_on__get__host(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_on__set__host(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} - static inline sg_host_t simcall_host_off__get__host(smx_simcall_t simcall) { return (sg_host_t) simcall->args[0].dp; } @@ -28,271 +21,6 @@ static inline void simcall_host_off__set__host(smx_simcall_t simcall, void* arg) simcall->args[0].dp = arg; } -static inline sg_host_t simcall_host_get_properties__get__host(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_get_properties__set__host(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline xbt_dict_t simcall_host_get_properties__get__result(smx_simcall_t simcall){ - return (xbt_dict_t) simcall->result.dp; -} -static inline void simcall_host_get_properties__set__result(smx_simcall_t simcall, void* result){ - simcall->result.dp = result; -} - -static inline sg_host_t simcall_host_get_process_list__get__host(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_get_process_list__set__host(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline xbt_swag_t simcall_host_get_process_list__get__result(smx_simcall_t simcall){ - return (xbt_swag_t) simcall->result.dp; -} -static inline void simcall_host_get_process_list__set__result(smx_simcall_t simcall, void* result){ - simcall->result.dp = result; -} - -static inline sg_host_t simcall_host_get_current_power_peak__get__host(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_get_current_power_peak__set__host(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline double simcall_host_get_current_power_peak__get__result(smx_simcall_t simcall){ - return simcall->result.d; -} -static inline void simcall_host_get_current_power_peak__set__result(smx_simcall_t simcall, double result){ - simcall->result.d = result; -} - -static inline sg_host_t simcall_host_get_power_peak_at__get__host(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_get_power_peak_at__set__host(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline int simcall_host_get_power_peak_at__get__pstate_index(smx_simcall_t simcall) { - return simcall->args[1].i; -} -static inline void simcall_host_get_power_peak_at__set__pstate_index(smx_simcall_t simcall, int arg) { - simcall->args[1].i = arg; -} -static inline double simcall_host_get_power_peak_at__get__result(smx_simcall_t simcall){ - return simcall->result.d; -} -static inline void simcall_host_get_power_peak_at__set__result(smx_simcall_t simcall, double result){ - simcall->result.d = result; -} - -static inline sg_host_t simcall_host_get_wattmin_at__get__host(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_get_wattmin_at__set__host(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline int simcall_host_get_wattmin_at__get__pstate_index(smx_simcall_t simcall) { - return simcall->args[1].i; -} -static inline void simcall_host_get_wattmin_at__set__pstate_index(smx_simcall_t simcall, int arg) { - simcall->args[1].i = arg; -} -static inline double simcall_host_get_wattmin_at__get__result(smx_simcall_t simcall){ - return simcall->result.d; -} -static inline void simcall_host_get_wattmin_at__set__result(smx_simcall_t simcall, double result){ - simcall->result.d = result; -} - -static inline sg_host_t simcall_host_get_wattmax_at__get__host(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_get_wattmax_at__set__host(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline int simcall_host_get_wattmax_at__get__pstate_index(smx_simcall_t simcall) { - return simcall->args[1].i; -} -static inline void simcall_host_get_wattmax_at__set__pstate_index(smx_simcall_t simcall, int arg) { - simcall->args[1].i = arg; -} -static inline double simcall_host_get_wattmax_at__get__result(smx_simcall_t simcall){ - return simcall->result.d; -} -static inline void simcall_host_get_wattmax_at__set__result(smx_simcall_t simcall, double result){ - simcall->result.d = result; -} - -static inline sg_host_t simcall_host_set_pstate__get__host(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_set_pstate__set__host(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline int simcall_host_set_pstate__get__pstate_index(smx_simcall_t simcall) { - return simcall->args[1].i; -} -static inline void simcall_host_set_pstate__set__pstate_index(smx_simcall_t simcall, int arg) { - simcall->args[1].i = arg; -} - -static inline sg_host_t simcall_host_get_mounted_storage_list__get__host(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_get_mounted_storage_list__set__host(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline xbt_dict_t simcall_host_get_mounted_storage_list__get__result(smx_simcall_t simcall){ - return (xbt_dict_t) simcall->result.dp; -} -static inline void simcall_host_get_mounted_storage_list__set__result(smx_simcall_t simcall, void* result){ - simcall->result.dp = result; -} - -static inline sg_host_t simcall_host_get_attached_storage_list__get__host(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_get_attached_storage_list__set__host(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline xbt_dynar_t simcall_host_get_attached_storage_list__get__result(smx_simcall_t simcall){ - return (xbt_dynar_t) simcall->result.dp; -} -static inline void simcall_host_get_attached_storage_list__set__result(smx_simcall_t simcall, void* result){ - simcall->result.dp = result; -} - -static inline sg_host_t simcall_host_get_params__get__ind_vm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_get_params__set__ind_vm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline vm_params_t simcall_host_get_params__get__params(smx_simcall_t simcall) { - return (vm_params_t) simcall->args[1].dp; -} -static inline void simcall_host_get_params__set__params(smx_simcall_t simcall, void* arg) { - simcall->args[1].dp = arg; -} - -static inline sg_host_t simcall_host_set_params__get__ind_vm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_host_set_params__set__ind_vm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline vm_params_t simcall_host_set_params__get__params(smx_simcall_t simcall) { - return (vm_params_t) simcall->args[1].dp; -} -static inline void simcall_host_set_params__set__params(smx_simcall_t simcall, void* arg) { - simcall->args[1].dp = arg; -} - -static inline const char* simcall_vm_create__get__name(smx_simcall_t simcall) { - return simcall->args[0].cc; -} -static inline void simcall_vm_create__set__name(smx_simcall_t simcall, const char* arg) { - simcall->args[0].cc = arg; -} -static inline sg_host_t simcall_vm_create__get__ind_pm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[1].dp; -} -static inline void simcall_vm_create__set__ind_pm(smx_simcall_t simcall, void* arg) { - simcall->args[1].dp = arg; -} -static inline sg_host_t simcall_vm_create__get__result(smx_simcall_t simcall){ - return (sg_host_t) simcall->result.dp; -} -static inline void simcall_vm_create__set__result(smx_simcall_t simcall, void* result){ - simcall->result.dp = result; -} - -static inline sg_host_t simcall_vm_start__get__ind_vm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_vm_start__set__ind_vm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} - -static inline sg_host_t simcall_vm_get_state__get__ind_vm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_vm_get_state__set__ind_vm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline int simcall_vm_get_state__get__result(smx_simcall_t simcall){ - return simcall->result.i; -} -static inline void simcall_vm_get_state__set__result(smx_simcall_t simcall, int result){ - simcall->result.i = result; -} - -static inline sg_host_t simcall_vm_migrate__get__ind_vm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_vm_migrate__set__ind_vm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline sg_host_t simcall_vm_migrate__get__ind_dst_pm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[1].dp; -} -static inline void simcall_vm_migrate__set__ind_dst_pm(smx_simcall_t simcall, void* arg) { - simcall->args[1].dp = arg; -} - -static inline sg_host_t simcall_vm_get_pm__get__ind_vm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_vm_get_pm__set__ind_vm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline void* simcall_vm_get_pm__get__result(smx_simcall_t simcall){ - return simcall->result.dp; -} -static inline void simcall_vm_get_pm__set__result(smx_simcall_t simcall, void* result){ - simcall->result.dp = result; -} - -static inline sg_host_t simcall_vm_set_bound__get__ind_vm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_vm_set_bound__set__ind_vm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline double simcall_vm_set_bound__get__bound(smx_simcall_t simcall) { - return simcall->args[1].d; -} -static inline void simcall_vm_set_bound__set__bound(smx_simcall_t simcall, double arg) { - simcall->args[1].d = arg; -} - -static inline sg_host_t simcall_vm_set_affinity__get__ind_vm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_vm_set_affinity__set__ind_vm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline sg_host_t simcall_vm_set_affinity__get__ind_pm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[1].dp; -} -static inline void simcall_vm_set_affinity__set__ind_pm(smx_simcall_t simcall, void* arg) { - simcall->args[1].dp = arg; -} -static inline unsigned long simcall_vm_set_affinity__get__mask(smx_simcall_t simcall) { - return simcall->args[2].ul; -} -static inline void simcall_vm_set_affinity__set__mask(smx_simcall_t simcall, unsigned long arg) { - simcall->args[2].ul = arg; -} - -static inline sg_host_t simcall_vm_destroy__get__ind_vm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_vm_destroy__set__ind_vm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} - static inline sg_host_t simcall_vm_suspend__get__ind_vm(smx_simcall_t simcall) { return (sg_host_t) simcall->args[0].dp; } @@ -328,25 +56,6 @@ static inline void simcall_vm_restore__set__ind_vm(smx_simcall_t simcall, void* simcall->args[0].dp = arg; } -static inline sg_host_t simcall_vm_migratefrom_resumeto__get__vm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[0].dp; -} -static inline void simcall_vm_migratefrom_resumeto__set__vm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline sg_host_t simcall_vm_migratefrom_resumeto__get__src_pm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[1].dp; -} -static inline void simcall_vm_migratefrom_resumeto__set__src_pm(smx_simcall_t simcall, void* arg) { - simcall->args[1].dp = arg; -} -static inline sg_host_t simcall_vm_migratefrom_resumeto__get__dst_pm(smx_simcall_t simcall) { - return (sg_host_t) simcall->args[2].dp; -} -static inline void simcall_vm_migratefrom_resumeto__set__dst_pm(smx_simcall_t simcall, void* arg) { - simcall->args[2].dp = arg; -} - static inline const char* simcall_process_create__get__name(smx_simcall_t simcall) { return simcall->args[0].cc; } @@ -443,65 +152,6 @@ static inline void simcall_process_resume__set__process(smx_simcall_t simcall, v simcall->args[0].dp = arg; } -static inline int simcall_process_count__get__result(smx_simcall_t simcall){ - return simcall->result.i; -} -static inline void simcall_process_count__set__result(smx_simcall_t simcall, int result){ - simcall->result.i = result; -} - -static inline smx_process_t simcall_process_get_PID__get__process(smx_simcall_t simcall) { - return (smx_process_t) simcall->args[0].dp; -} -static inline void simcall_process_get_PID__set__process(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline int simcall_process_get_PID__get__result(smx_simcall_t simcall){ - return simcall->result.i; -} -static inline void simcall_process_get_PID__set__result(smx_simcall_t simcall, int result){ - simcall->result.i = result; -} - -static inline smx_process_t simcall_process_get_PPID__get__process(smx_simcall_t simcall) { - return (smx_process_t) simcall->args[0].dp; -} -static inline void simcall_process_get_PPID__set__process(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline int simcall_process_get_PPID__get__result(smx_simcall_t simcall){ - return simcall->result.i; -} -static inline void simcall_process_get_PPID__set__result(smx_simcall_t simcall, int result){ - simcall->result.i = result; -} - -static inline smx_process_t simcall_process_get_data__get__process(smx_simcall_t simcall) { - return (smx_process_t) simcall->args[0].dp; -} -static inline void simcall_process_get_data__set__process(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline void* simcall_process_get_data__get__result(smx_simcall_t simcall){ - return simcall->result.dp; -} -static inline void simcall_process_get_data__set__result(smx_simcall_t simcall, void* result){ - simcall->result.dp = result; -} - -static inline smx_process_t simcall_process_set_data__get__process(smx_simcall_t simcall) { - return (smx_process_t) simcall->args[0].dp; -} -static inline void simcall_process_set_data__set__process(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline void* simcall_process_set_data__get__data(smx_simcall_t simcall) { - return simcall->args[1].dp; -} -static inline void simcall_process_set_data__set__data(smx_simcall_t simcall, void* arg) { - simcall->args[1].dp = arg; -} - static inline smx_process_t simcall_process_set_host__get__process(smx_simcall_t simcall) { return (smx_process_t) simcall->args[0].dp; } @@ -515,32 +165,6 @@ static inline void simcall_process_set_host__set__dest(smx_simcall_t simcall, vo simcall->args[1].dp = arg; } -static inline smx_process_t simcall_process_get_host__get__process(smx_simcall_t simcall) { - return (smx_process_t) simcall->args[0].dp; -} -static inline void simcall_process_get_host__set__process(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline sg_host_t simcall_process_get_host__get__result(smx_simcall_t simcall){ - return (sg_host_t) simcall->result.dp; -} -static inline void simcall_process_get_host__set__result(smx_simcall_t simcall, void* result){ - simcall->result.dp = result; -} - -static inline smx_process_t simcall_process_get_name__get__process(smx_simcall_t simcall) { - return (smx_process_t) simcall->args[0].dp; -} -static inline void simcall_process_get_name__set__process(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline const char* simcall_process_get_name__get__result(smx_simcall_t simcall){ - return simcall->result.cc; -} -static inline void simcall_process_get_name__set__result(smx_simcall_t simcall, const char* result){ - simcall->result.cc = result; -} - static inline smx_process_t simcall_process_is_suspended__get__process(smx_simcall_t simcall) { return (smx_process_t) simcall->args[0].dp; } @@ -554,19 +178,6 @@ static inline void simcall_process_is_suspended__set__result(smx_simcall_t simca simcall->result.i = result; } -static inline smx_process_t simcall_process_get_properties__get__process(smx_simcall_t simcall) { - return (smx_process_t) simcall->args[0].dp; -} -static inline void simcall_process_get_properties__set__process(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline xbt_dict_t simcall_process_get_properties__get__result(smx_simcall_t simcall){ - return (xbt_dict_t) simcall->result.dp; -} -static inline void simcall_process_get_properties__set__result(smx_simcall_t simcall, void* result){ - simcall->result.dp = result; -} - static inline smx_process_t simcall_process_join__get__process(smx_simcall_t simcall) { return (smx_process_t) simcall->args[0].dp; } diff --git a/src/simix/popping_bodies.cpp b/src/simix/popping_bodies.cpp index 1c50638101..99643d633c 100644 --- a/src/simix/popping_bodies.cpp +++ b/src/simix/popping_bodies.cpp @@ -18,448 +18,17 @@ #include "xbt/ex.h" #include -inline static void simcall_BODY_host_on(sg_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_host_on(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)); - self->simcall.args[0].dp = (void*) host; - 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_handle(&self->simcall, 0); - } - - } - -inline static void simcall_BODY_host_off(sg_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) simcall_HANDLER_host_off(&self->simcall, host); - /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ - - self->simcall.call = SIMCALL_HOST_OFF; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) host; - 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_handle(&self->simcall, 0); - } - - } - -inline static xbt_dict_t simcall_BODY_host_get_properties(sg_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_host_get_properties(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)); - self->simcall.args[0].dp = (void*) host; - 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_handle(&self->simcall, 0); - } - return (xbt_dict_t) self->simcall.result.dp; - } - -inline static xbt_swag_t simcall_BODY_host_get_process_list(sg_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_host_get_process_list(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)); - self->simcall.args[0].dp = (void*) host; - 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_handle(&self->simcall, 0); - } - return (xbt_swag_t) self->simcall.result.dp; - } - -inline static double simcall_BODY_host_get_current_power_peak(sg_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_host_get_current_power_peak(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)); - self->simcall.args[0].dp = (void*) host; - 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_handle(&self->simcall, 0); - } - return (double) self->simcall.result.d; - } - -inline static double simcall_BODY_host_get_power_peak_at(sg_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_host_get_power_peak_at(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)); - self->simcall.args[0].dp = (void*) host; - self->simcall.args[1].i = (int) pstate_index; - 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_handle(&self->simcall, 0); - } - return (double) self->simcall.result.d; - } - -inline static double simcall_BODY_host_get_wattmin_at(sg_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_host_get_wattmin_at(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_WATTMIN_AT; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) host; - self->simcall.args[1].i = (int) pstate_index; - 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_handle(&self->simcall, 0); - } - return (double) self->simcall.result.d; - } - -inline static double simcall_BODY_host_get_wattmax_at(sg_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_host_get_wattmax_at(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_WATTMAX_AT; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) host; - self->simcall.args[1].i = (int) pstate_index; - 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_handle(&self->simcall, 0); - } - return (double) self->simcall.result.d; - } - -inline static void simcall_BODY_host_set_pstate(sg_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_host_set_pstate(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_PSTATE; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) host; - self->simcall.args[1].i = (int) pstate_index; - 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_handle(&self->simcall, 0); - } - - } - -inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(sg_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_host_get_mounted_storage_list(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)); - self->simcall.args[0].dp = (void*) host; - 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_handle(&self->simcall, 0); - } - return (xbt_dict_t) self->simcall.result.dp; - } - -inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(sg_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_host_get_attached_storage_list(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)); - self->simcall.args[0].dp = (void*) host; - 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_handle(&self->simcall, 0); - } - return (xbt_dynar_t) self->simcall.result.dp; - } - -inline static void simcall_BODY_host_get_params(sg_host_t ind_vm, vm_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_host_get_params(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)); - self->simcall.args[0].dp = (void*) ind_vm; - self->simcall.args[1].dp = (void*) params; - 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_handle(&self->simcall, 0); - } - - } - -inline static void simcall_BODY_host_set_params(sg_host_t ind_vm, vm_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_host_set_params(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)); - self->simcall.args[0].dp = (void*) ind_vm; - self->simcall.args[1].dp = (void*) params; - 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_handle(&self->simcall, 0); - } - - } - -inline static sg_host_t simcall_BODY_vm_create(const char* name, sg_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_vm_create(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)); - self->simcall.args[0].cc = (const char*) name; - self->simcall.args[1].dp = (void*) ind_pm; - 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_handle(&self->simcall, 0); - } - return (sg_host_t) self->simcall.result.dp; - } - -inline static void simcall_BODY_vm_start(sg_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_vm_start(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)); - self->simcall.args[0].dp = (void*) ind_vm; - 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_handle(&self->simcall, 0); - } - - } - -inline static int simcall_BODY_vm_get_state(sg_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_vm_get_state(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)); - self->simcall.args[0].dp = (void*) ind_vm; - 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_handle(&self->simcall, 0); - } - return (int) self->simcall.result.i; - } - -inline static void simcall_BODY_vm_migrate(sg_host_t ind_vm, sg_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_vm_migrate(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)); - self->simcall.args[0].dp = (void*) ind_vm; - self->simcall.args[1].dp = (void*) ind_dst_pm; - 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_handle(&self->simcall, 0); - } - - } - -inline static void* simcall_BODY_vm_get_pm(sg_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_vm_get_pm(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)); - self->simcall.args[0].dp = (void*) ind_vm; - 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_handle(&self->simcall, 0); - } - return (void*) self->simcall.result.dp; - } - -inline static void simcall_BODY_vm_set_bound(sg_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_vm_set_bound(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)); - self->simcall.args[0].dp = (void*) ind_vm; - self->simcall.args[1].d = (double) bound; - 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_handle(&self->simcall, 0); - } - - } - -inline static void simcall_BODY_vm_set_affinity(sg_host_t ind_vm, sg_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_vm_set_affinity(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)); - self->simcall.args[0].dp = (void*) ind_vm; - self->simcall.args[1].dp = (void*) ind_pm; - self->simcall.args[2].ul = (unsigned long) mask; - 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_handle(&self->simcall, 0); - } - - } - -inline static void simcall_BODY_vm_destroy(sg_host_t ind_vm) { +inline static void simcall_BODY_host_off(sg_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_vm_destroy(ind_vm); + if (0) simcall_HANDLER_host_off(&self->simcall, host); /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ - self->simcall.call = SIMCALL_VM_DESTROY; + self->simcall.call = SIMCALL_HOST_OFF; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) ind_vm; + self->simcall.args[0].dp = (void*) host; 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); @@ -575,29 +144,6 @@ inline static void simcall_BODY_vm_restore(sg_host_t ind_vm) { } -inline static void simcall_BODY_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t 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_vm_migratefrom_resumeto(vm, src_pm, dst_pm); - /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ - - self->simcall.call = SIMCALL_VM_MIGRATEFROM_RESUMETO; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) vm; - self->simcall.args[1].dp = (void*) src_pm; - self->simcall.args[2].dp = (void*) dst_pm; - 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_handle(&self->simcall, 0); - } - - } - inline static void* simcall_BODY_process_create(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(); @@ -732,112 +278,6 @@ inline static void simcall_BODY_process_resume(smx_process_t process) { } -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_process_count(); - /* 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)); - - 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_handle(&self->simcall, 0); - } - return (int) self->simcall.result.i; - } - -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_process_get_PID(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)); - self->simcall.args[0].dp = (void*) process; - 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_handle(&self->simcall, 0); - } - return (int) self->simcall.result.i; - } - -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_process_get_PPID(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)); - self->simcall.args[0].dp = (void*) process; - 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_handle(&self->simcall, 0); - } - return (int) self->simcall.result.i; - } - -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_process_get_data(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)); - self->simcall.args[0].dp = (void*) process; - 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_handle(&self->simcall, 0); - } - return (void*) self->simcall.result.dp; - } - -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_process_set_data(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)); - self->simcall.args[0].dp = (void*) process; - self->simcall.args[1].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_handle(&self->simcall, 0); - } - - } - inline static void simcall_BODY_process_set_host(smx_process_t process, sg_host_t dest) { smx_process_t self = SIMIX_process_self(); @@ -860,48 +300,6 @@ inline static void simcall_BODY_process_set_host(smx_process_t process, sg_host_ } -inline static sg_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_process_get_host(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)); - self->simcall.args[0].dp = (void*) process; - 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_handle(&self->simcall, 0); - } - return (sg_host_t) self->simcall.result.dp; - } - -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_process_get_name(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)); - self->simcall.args[0].dp = (void*) process; - 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_handle(&self->simcall, 0); - } - return (const char*) self->simcall.result.cc; - } - inline static int simcall_BODY_process_is_suspended(smx_process_t process) { smx_process_t self = SIMIX_process_self(); @@ -923,27 +321,6 @@ inline static int simcall_BODY_process_is_suspended(smx_process_t process) { return (int) self->simcall.result.i; } -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_process_get_properties(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)); - self->simcall.args[0].dp = (void*) process; - 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_handle(&self->simcall, 0); - } - return (xbt_dict_t) self->simcall.result.dp; - } - inline static int simcall_BODY_process_join(smx_process_t process, double timeout) { smx_process_t self = SIMIX_process_self(); diff --git a/src/simix/popping_enum.h b/src/simix/popping_enum.h index 38aef99d89..1b0676af47 100644 --- a/src/simix/popping_enum.h +++ b/src/simix/popping_enum.h @@ -18,49 +18,20 @@ */ typedef enum { SIMCALL_NONE, - SIMCALL_HOST_ON, SIMCALL_HOST_OFF, - SIMCALL_HOST_GET_PROPERTIES, - SIMCALL_HOST_GET_PROCESS_LIST, - SIMCALL_HOST_GET_CURRENT_POWER_PEAK, - SIMCALL_HOST_GET_POWER_PEAK_AT, - SIMCALL_HOST_GET_WATTMIN_AT, - SIMCALL_HOST_GET_WATTMAX_AT, - SIMCALL_HOST_SET_PSTATE, - SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST, - SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST, - SIMCALL_HOST_GET_PARAMS, - SIMCALL_HOST_SET_PARAMS, - SIMCALL_VM_CREATE, - SIMCALL_VM_START, - SIMCALL_VM_GET_STATE, - SIMCALL_VM_MIGRATE, - SIMCALL_VM_GET_PM, - SIMCALL_VM_SET_BOUND, - SIMCALL_VM_SET_AFFINITY, - SIMCALL_VM_DESTROY, SIMCALL_VM_SUSPEND, SIMCALL_VM_RESUME, SIMCALL_VM_SHUTDOWN, SIMCALL_VM_SAVE, SIMCALL_VM_RESTORE, - SIMCALL_VM_MIGRATEFROM_RESUMETO, SIMCALL_PROCESS_CREATE, SIMCALL_PROCESS_KILL, SIMCALL_PROCESS_KILLALL, SIMCALL_PROCESS_CLEANUP, SIMCALL_PROCESS_SUSPEND, SIMCALL_PROCESS_RESUME, - SIMCALL_PROCESS_COUNT, - SIMCALL_PROCESS_GET_PID, - SIMCALL_PROCESS_GET_PPID, - SIMCALL_PROCESS_GET_DATA, - SIMCALL_PROCESS_SET_DATA, SIMCALL_PROCESS_SET_HOST, - SIMCALL_PROCESS_GET_HOST, - SIMCALL_PROCESS_GET_NAME, SIMCALL_PROCESS_IS_SUSPENDED, - SIMCALL_PROCESS_GET_PROPERTIES, SIMCALL_PROCESS_JOIN, SIMCALL_PROCESS_SLEEP, SIMCALL_PROCESS_EXECUTE, diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index 7a3bd8bfa0..b9f26ada3d 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -23,49 +23,20 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping); /** @brief Simcalls' names (generated from src/simix/simcalls.in) */ const char* simcall_names[] = { - "SIMCALL_NONE", "SIMCALL_HOST_ON", - "SIMCALL_HOST_OFF", - "SIMCALL_HOST_GET_PROPERTIES", - "SIMCALL_HOST_GET_PROCESS_LIST", - "SIMCALL_HOST_GET_CURRENT_POWER_PEAK", - "SIMCALL_HOST_GET_POWER_PEAK_AT", - "SIMCALL_HOST_GET_WATTMIN_AT", - "SIMCALL_HOST_GET_WATTMAX_AT", - "SIMCALL_HOST_SET_PSTATE", - "SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST", - "SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST", - "SIMCALL_HOST_GET_PARAMS", - "SIMCALL_HOST_SET_PARAMS", - "SIMCALL_VM_CREATE", - "SIMCALL_VM_START", - "SIMCALL_VM_GET_STATE", - "SIMCALL_VM_MIGRATE", - "SIMCALL_VM_GET_PM", - "SIMCALL_VM_SET_BOUND", - "SIMCALL_VM_SET_AFFINITY", - "SIMCALL_VM_DESTROY", + "SIMCALL_NONE", "SIMCALL_HOST_OFF", "SIMCALL_VM_SUSPEND", "SIMCALL_VM_RESUME", "SIMCALL_VM_SHUTDOWN", "SIMCALL_VM_SAVE", "SIMCALL_VM_RESTORE", - "SIMCALL_VM_MIGRATEFROM_RESUMETO", "SIMCALL_PROCESS_CREATE", "SIMCALL_PROCESS_KILL", "SIMCALL_PROCESS_KILLALL", "SIMCALL_PROCESS_CLEANUP", "SIMCALL_PROCESS_SUSPEND", "SIMCALL_PROCESS_RESUME", - "SIMCALL_PROCESS_COUNT", - "SIMCALL_PROCESS_GET_PID", - "SIMCALL_PROCESS_GET_PPID", - "SIMCALL_PROCESS_GET_DATA", - "SIMCALL_PROCESS_SET_DATA", "SIMCALL_PROCESS_SET_HOST", - "SIMCALL_PROCESS_GET_HOST", - "SIMCALL_PROCESS_GET_NAME", "SIMCALL_PROCESS_IS_SUSPENDED", - "SIMCALL_PROCESS_GET_PROPERTIES", "SIMCALL_PROCESS_JOIN", "SIMCALL_PROCESS_SLEEP", "SIMCALL_PROCESS_EXECUTE", @@ -160,111 +131,11 @@ void SIMIX_simcall_handle(smx_simcall_t simcall, int value) { if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP) return; switch (simcall->call) { -case SIMCALL_HOST_ON: - SIMIX_host_on((sg_host_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - case SIMCALL_HOST_OFF: simcall_HANDLER_host_off(simcall , (sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; -case SIMCALL_HOST_GET_PROPERTIES: - simcall->result.dp = SIMIX_host_get_properties((sg_host_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_HOST_GET_PROCESS_LIST: - simcall->result.dp = SIMIX_host_get_process_list((sg_host_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_HOST_GET_CURRENT_POWER_PEAK: - simcall->result.d = SIMIX_host_get_current_power_peak((sg_host_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_HOST_GET_POWER_PEAK_AT: - simcall->result.d = SIMIX_host_get_power_peak_at((sg_host_t) simcall->args[0].dp, simcall->args[1].i); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_HOST_GET_WATTMIN_AT: - simcall->result.d = SIMIX_host_get_wattmin_at((sg_host_t) simcall->args[0].dp, simcall->args[1].i); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_HOST_GET_WATTMAX_AT: - simcall->result.d = SIMIX_host_get_wattmax_at((sg_host_t) simcall->args[0].dp, simcall->args[1].i); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_HOST_SET_PSTATE: - SIMIX_host_set_pstate((sg_host_t) simcall->args[0].dp, simcall->args[1].i); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST: - simcall->result.dp = SIMIX_host_get_mounted_storage_list((sg_host_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST: - simcall->result.dp = SIMIX_host_get_attached_storage_list((sg_host_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_HOST_GET_PARAMS: - SIMIX_host_get_params((sg_host_t) simcall->args[0].dp,(vm_params_t) simcall->args[1].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_HOST_SET_PARAMS: - SIMIX_host_set_params((sg_host_t) simcall->args[0].dp,(vm_params_t) simcall->args[1].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_VM_CREATE: - simcall->result.dp = SIMIX_vm_create( simcall->args[0].cc,(sg_host_t) simcall->args[1].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_VM_START: - SIMIX_vm_start((sg_host_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_VM_GET_STATE: - simcall->result.i = SIMIX_vm_get_state((sg_host_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_VM_MIGRATE: - SIMIX_vm_migrate((sg_host_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_VM_GET_PM: - simcall->result.dp = SIMIX_vm_get_pm((sg_host_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_VM_SET_BOUND: - SIMIX_vm_set_bound((sg_host_t) simcall->args[0].dp, simcall->args[1].d); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_VM_SET_AFFINITY: - SIMIX_vm_set_affinity((sg_host_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp, simcall->args[2].ul); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_VM_DESTROY: - SIMIX_vm_destroy((sg_host_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - case SIMCALL_VM_SUSPEND: simcall_HANDLER_vm_suspend(simcall , (sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); @@ -290,11 +161,6 @@ case SIMCALL_VM_RESTORE: SIMIX_simcall_answer(simcall); break; -case SIMCALL_VM_MIGRATEFROM_RESUMETO: - SIMIX_vm_migratefrom_resumeto((sg_host_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp,(sg_host_t) simcall->args[2].dp); - SIMIX_simcall_answer(simcall); - break; - case SIMCALL_PROCESS_CREATE: simcall->result.dp = simcall_HANDLER_process_create(simcall , simcall->args[0].cc, (xbt_main_func_t) simcall->args[1].fp, simcall->args[2].dp, simcall->args[3].cc, simcall->args[4].d, simcall->args[5].i, (char**) simcall->args[6].dp, (xbt_dict_t) simcall->args[7].dp, simcall->args[8].i); SIMIX_simcall_answer(simcall); @@ -324,56 +190,16 @@ case SIMCALL_PROCESS_RESUME: SIMIX_simcall_answer(simcall); break; -case SIMCALL_PROCESS_COUNT: - simcall->result.i = SIMIX_process_count(); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_PROCESS_GET_PID: - simcall->result.i = SIMIX_process_get_PID((smx_process_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_PROCESS_GET_PPID: - simcall->result.i = SIMIX_process_get_PPID((smx_process_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_PROCESS_GET_DATA: - simcall->result.dp = SIMIX_process_get_data((smx_process_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_PROCESS_SET_DATA: - SIMIX_process_set_data((smx_process_t) simcall->args[0].dp, simcall->args[1].dp); - SIMIX_simcall_answer(simcall); - break; - case SIMCALL_PROCESS_SET_HOST: simcall_HANDLER_process_set_host(simcall , (smx_process_t) simcall->args[0].dp, (sg_host_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; -case SIMCALL_PROCESS_GET_HOST: - simcall->result.dp = SIMIX_process_get_host((smx_process_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - -case SIMCALL_PROCESS_GET_NAME: - simcall->result.cc = SIMIX_process_get_name((smx_process_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - case SIMCALL_PROCESS_IS_SUSPENDED: simcall->result.i = SIMIX_process_is_suspended((smx_process_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; -case SIMCALL_PROCESS_GET_PROPERTIES: - simcall->result.dp = SIMIX_process_get_properties((smx_process_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - case SIMCALL_PROCESS_JOIN: simcall_HANDLER_process_join(simcall , (smx_process_t) simcall->args[0].dp, simcall->args[1].d); break; diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index 7d6ec3b059..469b171782 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -46,54 +46,26 @@ # ./include/simgrid/simix.h (otherwise you will get a warning at the # compilation time) -Proc - host_on (void) (host, void*, sg_host_t) Proc H host_off (void) (host, void*, sg_host_t) -Func - host_get_properties (void*, xbt_dict_t) (host, void*, sg_host_t) -Func - host_get_process_list (void*, xbt_swag_t) (host, void*, sg_host_t) -Func - host_get_current_power_peak (double) (host, void*, sg_host_t) -Func - host_get_power_peak_at (double) (host, void*, sg_host_t) (pstate_index, int) -Func - host_get_wattmin_at (double) (host, void*, sg_host_t) (pstate_index, int) -Func - host_get_wattmax_at (double) (host, void*, sg_host_t) (pstate_index, int) -Proc - host_set_pstate (void) (host, void*, sg_host_t) (pstate_index, int) - -Func - host_get_mounted_storage_list (void*, xbt_dict_t) (host, void*, sg_host_t) -Func - host_get_attached_storage_list (void*, xbt_dynar_t) (host, void*, sg_host_t) -Proc - host_get_params (void) (ind_vm, void*, sg_host_t) (params, void*, vm_params_t) -Proc - host_set_params (void) (ind_vm, void*, sg_host_t) (params, void*, vm_params_t) -Func - vm_create (void*, sg_host_t) (name, const char*) (ind_pm, void*, sg_host_t) -Proc - vm_start (void) (ind_vm, void*, sg_host_t) -Func - vm_get_state (int) (ind_vm, void*, sg_host_t) -Proc - vm_migrate (void) (ind_vm, void*, sg_host_t) (ind_dst_pm, void*, sg_host_t) -Func - vm_get_pm (void*) (ind_vm, void*, sg_host_t) -Proc - vm_set_bound (void) (ind_vm, void*, sg_host_t) (bound, double) -Proc - vm_set_affinity (void) (ind_vm, void*, sg_host_t) (ind_pm, void*, sg_host_t) (mask, unsigned long) -Proc - vm_destroy (void) (ind_vm, void*, sg_host_t) + Proc H vm_suspend (void) (ind_vm, void*, sg_host_t) Proc H vm_resume (void) (ind_vm, void*, sg_host_t) Proc H vm_shutdown (void) (ind_vm, void*, sg_host_t) Proc H vm_save (void) (ind_vm, void*, sg_host_t) Proc H vm_restore (void) (ind_vm, void*, sg_host_t) -Proc - vm_migratefrom_resumeto (void) (vm, void*, sg_host_t)(src_pm, void*, sg_host_t) (dst_pm, void*, sg_host_t) + Func H process_create (void*) (name, const char*) (code, FPtr, xbt_main_func_t) (data, void*) (hostname, const char*) (kill_time, double) (argc, int) (argv, void*, char**) (properties, void*, xbt_dict_t) (auto_restart, int) Proc H process_kill (void) (process, void*, smx_process_t) Proc H process_killall (void) (reset_pid, int) Proc - process_cleanup (void) (process, void*, smx_process_t) Blck H process_suspend (void) (process, void*, smx_process_t) Proc H process_resume (void) (process, void*, smx_process_t) -Func - process_count (int) -Func - process_get_PID (int) (process, void*, smx_process_t) -Func - process_get_PPID (int) (process, void*, smx_process_t) -Func - process_get_data (void*) (process, void*, smx_process_t) -Proc - process_set_data (void) (process, void*, smx_process_t) (data, void*) Proc H process_set_host (void) (process, void*, smx_process_t) (dest, void*, sg_host_t) -Func - process_get_host (void*, sg_host_t) (process, void*, smx_process_t) -Func - process_get_name (const char*) (process, void*, smx_process_t) Func - process_is_suspended (int) (process, void*, smx_process_t) -Func - process_get_properties (void*, xbt_dict_t) (process, void*, smx_process_t) Blck H process_join (int) (process, void*, smx_process_t) (timeout, double) Blck H process_sleep (int) (duration, double) - Func H process_execute (void*, smx_synchro_t) (name, const char*) (flops_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long) + Func - process_parallel_execute (void*, smx_synchro_t) (name, const char*) (host_nb, int) (host_list, void*, sg_host_t*) (flops_amount, void*, double*) (bytes_amount, void*, double*) (amount, double) (rate, double) Proc - process_execution_destroy (void) (execution, void*, smx_synchro_t) Proc - process_execution_cancel (void) (execution, void*, smx_synchro_t) @@ -114,6 +86,7 @@ Func - rdv_comm_count_by_host (unsigned int) (rdv, void*, smx_rdv_t) (host, void Func - rdv_get_head (void*, smx_synchro_t) (rdv, void*, smx_rdv_t) Proc - rdv_set_receiver (void) (rdv, void*, smx_rdv_t) (receiver, void*, smx_process_t) Func - rdv_get_receiver (void*, smx_process_t) (rdv, void*, smx_rdv_t) + Func H comm_iprobe (void*, smx_synchro_t) (rdv, void*, smx_rdv_t) (type, int) (src, int) (tag, int) (match_fun, FPtr, simix_match_func_t) (data, void*) Blck H comm_send (void) (sender, void*, smx_process_t) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (timeout, double) Func H comm_isend (void*, smx_synchro_t) (sender, void*, smx_process_t) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (clean_fun, FPtr, simix_clean_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (detached, int) @@ -130,17 +103,20 @@ Func - comm_get_src_data (void*) (comm, void*, smx_synchro_t) Func - comm_get_dst_data (void*) (comm, void*, smx_synchro_t) Func - comm_get_src_proc (void*, smx_process_t) (comm, void*, smx_synchro_t) Func - comm_get_dst_proc (void*, smx_process_t) (comm, void*, smx_synchro_t) + Func H mutex_init (void*, smx_mutex_t) Proc - mutex_destroy (void) (mutex, void*, smx_mutex_t) Blck H mutex_lock (void) (mutex, void*, smx_mutex_t) Func H mutex_trylock (int) (mutex, void*, smx_mutex_t) Proc H mutex_unlock (void) (mutex, void*, smx_mutex_t) + Func - cond_init (void*, smx_cond_t) Proc - cond_destroy (void) (cond, void*, smx_cond_t) Proc - cond_signal (void) (cond, void*, smx_cond_t) Blck H cond_wait (void) (cond, void*, smx_cond_t) (mutex, void*, smx_mutex_t) Blck H cond_wait_timeout (void) (cond, void*, smx_cond_t) (mutex, void*, smx_mutex_t) (timeout, double) Proc - cond_broadcast (void) (cond, void*, smx_cond_t) + Func - sem_init (void*, smx_sem_t) (capacity, unsigned int) Proc - sem_destroy (void) (sem, void*, smx_sem_t) Proc H sem_release (void) (sem, void*, smx_sem_t) @@ -148,6 +124,7 @@ Func H sem_would_block (int) (sem, void*, smx_sem_t) Blck H sem_acquire (void) (sem, void*, smx_sem_t) Blck H sem_acquire_timeout (void) (sem, void*, smx_sem_t) (timeout, double) Func H sem_get_capacity (int) (sem, void*, smx_sem_t) + Blck H file_read (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t) (host, void*, sg_host_t) Blck H file_write (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t) (host, void*, sg_host_t) Blck H file_open (void*, smx_file_t) (fullpath, const char*) (host, void*, sg_host_t) @@ -158,14 +135,18 @@ Func H file_tell (sg_size_t) (fd, void*, smx_file_t) Func H file_seek (int) (fd, void*, smx_file_t) (offset, sg_offset_t) (origin, int) Func H file_get_info (void*, xbt_dynar_t) (fd, void*, smx_file_t) Func H file_move (int) (fd, void*, smx_file_t) (fullpath, const char*) + Func H storage_get_free_size (sg_size_t) (storage, void*, smx_storage_t) Func H storage_get_used_size (sg_size_t) (name, void*, smx_storage_t) Func - storage_get_properties (void*, xbt_dict_t) (storage, void*, smx_storage_t) Func - storage_get_content (void*, xbt_dict_t) (storage, void*, smx_storage_t) + Func H asr_get_properties (void*, xbt_dict_t) (name, const char*) Func H mc_random (int) (min, int) (max, int) Proc - set_category (void) (synchro, void*, smx_synchro_t) (category, const char*) + Proc - run_kernel (void) (code, void*) + ## HAVE_LATENCY_BOUND_TRACKING Func - comm_is_latency_bounded (int) (comm, void*, smx_synchro_t) ## HAVE_MC