From: Martin Quinson Date: Tue, 14 Jul 2015 21:25:33 +0000 (+0200) Subject: Give simgrid's host its own header file and datatype X-Git-Tag: v3_12~504 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/7dbf5c66d75338dce60fd2242be656eaa7e4d2da Give simgrid's host its own header file and datatype This is one step further toward SGpp, the C++ version of SimGrid. --- diff --git a/buildtools/Cmake/DefinePackages.cmake b/buildtools/Cmake/DefinePackages.cmake index 01daaf5f15..fe7c23011e 100644 --- a/buildtools/Cmake/DefinePackages.cmake +++ b/buildtools/Cmake/DefinePackages.cmake @@ -685,6 +685,7 @@ set(headers_to_install include/simgrid/platf_generator.h include/simgrid/plugins.h include/simgrid/simix.h + include/simgrid/host.h include/smpi/mpi.h include/smpi/smpi.h include/smpi/smpi_cocci.h diff --git a/include/simgrid/platf.h b/include/simgrid/platf.h index 4da5c79b18..d19beb3601 100644 --- a/include/simgrid/platf.h +++ b/include/simgrid/platf.h @@ -10,6 +10,7 @@ #define SG_PLATF_H #include +#include SG_BEGIN_DECL() @@ -81,7 +82,6 @@ XBT_PUBLIC(probabilist_event_generator_t) tmgr_event_generator_new_weibull(const double scale, double shape); -typedef xbt_dictelm_t sg_host_t; static inline char* sg_host_name(sg_host_t host) { return host->key; } diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index c16e39d1cc..95c78df42f 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -15,6 +15,7 @@ #include "xbt/swag.h" #include "simgrid/platf.h" #include "simgrid/datatypes.h" +#include "simgrid/host.h" SG_BEGIN_DECL() @@ -35,7 +36,6 @@ typedef union u_smx_scalar u_smx_scalar_t; \see m_host_management @{ */ -typedef xbt_dictelm_t smx_host_t; typedef struct s_smx_host_priv *smx_host_priv_t; typedef enum { SIMIX_WAITING, @@ -99,7 +99,7 @@ typedef enum { * const char *name: a name for the object. It is for user-level information and can be NULL * xbt_main_func_t code: is a function describing the behavior of the process * void *data: data a pointer to any data one may want to attach to the new object. - * smx_host_t host: the location where the new process is executed + * sg_host_t host: the location where the new process is executed * int argc, char **argv: parameters passed to code * xbt_dict_t pros: properties */ @@ -134,7 +134,7 @@ typedef void (*void_pfn_smxprocess_t) (smx_process_t); /* Process kill */ typedef void (*void_pfn_smxprocess_t_smxprocess_t) (smx_process_t, smx_process_t); /* for auto-restart function */ -typedef void (*void_pfn_smxhost_t) (smx_host_t); +typedef void (*void_pfn_sghost_t) (sg_host_t); /* The following function pointer types describe the interface that any context factory should implement */ @@ -261,15 +261,15 @@ XBT_PUBLIC(void) SIMIX_process_set_function(const char* process_host, /*********************************** Host *************************************/ //XBT_PUBLIC(xbt_dict_t) SIMIX_host_get_dict(u_smx_scalar_t *args); -XBT_PUBLIC(smx_host_t) SIMIX_host_get_by_name(const char *name); -XBT_PUBLIC(smx_host_t) SIMIX_host_self(void); +XBT_PUBLIC(sg_host_t) SIMIX_host_get_by_name(const char *name); +XBT_PUBLIC(sg_host_t) SIMIX_host_self(void); XBT_PUBLIC(const char*) SIMIX_host_self_get_name(void); #define SIMIX_host_get_name(h) sg_host_name(h) /* DEPRECATED: SIMIX_host_get_name */ -XBT_PUBLIC(void) SIMIX_host_on(smx_host_t host); -XBT_PUBLIC(void) SIMIX_host_off(smx_host_t host, smx_process_t issuer); +XBT_PUBLIC(void) SIMIX_host_on(sg_host_t host); +XBT_PUBLIC(void) SIMIX_host_off(sg_host_t host, smx_process_t issuer); XBT_PUBLIC(void) SIMIX_host_self_set_data(void *data); XBT_PUBLIC(void*) SIMIX_host_self_get_data(void); -XBT_PUBLIC(xbt_dict_t) SIMIX_host_get_mounted_storage_list(smx_host_t host); +XBT_PUBLIC(xbt_dict_t) SIMIX_host_get_mounted_storage_list(sg_host_t host); /********************************* Process ************************************/ XBT_PUBLIC(int) SIMIX_process_count(void); XBT_PUBLIC(smx_process_t) SIMIX_process_self(void); @@ -300,37 +300,37 @@ XBT_PUBLIC(void) SIMIX_comm_finish(smx_synchro_t synchro); /******************************************************************************/ /******************************* Host simcalls ********************************/ -/* TODO use handlers and keep smx_host_t hidden from higher levels */ -XBT_PUBLIC(smx_host_t) simcall_host_get_by_name(const char *name); -XBT_PUBLIC(const char *) simcall_host_get_name(smx_host_t host); -XBT_PUBLIC(xbt_dict_t) simcall_host_get_properties(smx_host_t host); -XBT_PUBLIC(void) simcall_host_on(smx_host_t host); -XBT_PUBLIC(void) simcall_host_off(smx_host_t host); -XBT_PUBLIC(int) simcall_host_get_core(smx_host_t host); -XBT_PUBLIC(xbt_swag_t) simcall_host_get_process_list(smx_host_t host); -XBT_PUBLIC(double) simcall_host_get_speed(smx_host_t host); -XBT_PUBLIC(double) simcall_host_get_available_speed(smx_host_t host); +/* TODO use handlers and keep sg_host_t hidden from higher levels */ +XBT_PUBLIC(sg_host_t) simcall_host_get_by_name(const char *name); +XBT_PUBLIC(const char *) simcall_host_get_name(sg_host_t host); +XBT_PUBLIC(xbt_dict_t) simcall_host_get_properties(sg_host_t host); +XBT_PUBLIC(void) simcall_host_on(sg_host_t host); +XBT_PUBLIC(void) simcall_host_off(sg_host_t host); +XBT_PUBLIC(int) simcall_host_get_core(sg_host_t host); +XBT_PUBLIC(xbt_swag_t) simcall_host_get_process_list(sg_host_t host); +XBT_PUBLIC(double) simcall_host_get_speed(sg_host_t host); +XBT_PUBLIC(double) simcall_host_get_available_speed(sg_host_t host); /* Two possible states, 1 - CPU ON and 0 CPU OFF */ -XBT_PUBLIC(int) simcall_host_get_state(smx_host_t host); -XBT_PUBLIC(void *) simcall_host_get_data(smx_host_t host); +XBT_PUBLIC(int) simcall_host_get_state(sg_host_t host); +XBT_PUBLIC(void *) simcall_host_get_data(sg_host_t host); -XBT_PUBLIC(void) simcall_host_set_data(smx_host_t host, void *data); +XBT_PUBLIC(void) simcall_host_set_data(sg_host_t host, void *data); -XBT_PUBLIC(double) simcall_host_get_current_power_peak(smx_host_t host); -XBT_PUBLIC(double) simcall_host_get_power_peak_at(smx_host_t host, int pstate_index); -XBT_PUBLIC(int) simcall_host_get_nb_pstates(smx_host_t host); -XBT_PUBLIC(void) simcall_host_set_pstate(smx_host_t host, int pstate_index); -XBT_PUBLIC(int) simcall_host_get_pstate(smx_host_t host); -XBT_PUBLIC(double) simcall_host_get_consumed_energy(smx_host_t host); -XBT_PUBLIC(double) simcall_host_get_wattmin_at(smx_host_t host, int pstate); -XBT_PUBLIC(double) simcall_host_get_wattmax_at(smx_host_t host, int pstate); +XBT_PUBLIC(double) simcall_host_get_current_power_peak(sg_host_t host); +XBT_PUBLIC(double) simcall_host_get_power_peak_at(sg_host_t host, int pstate_index); +XBT_PUBLIC(int) simcall_host_get_nb_pstates(sg_host_t host); +XBT_PUBLIC(void) simcall_host_set_pstate(sg_host_t host, int pstate_index); +XBT_PUBLIC(int) simcall_host_get_pstate(sg_host_t host); +XBT_PUBLIC(double) simcall_host_get_consumed_energy(sg_host_t host); +XBT_PUBLIC(double) simcall_host_get_wattmin_at(sg_host_t host, int pstate); +XBT_PUBLIC(double) simcall_host_get_wattmax_at(sg_host_t host, int pstate); -XBT_PUBLIC(smx_synchro_t) simcall_host_execute(const char *name, smx_host_t host, +XBT_PUBLIC(smx_synchro_t) simcall_host_execute(const char *name, sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask); XBT_PUBLIC(smx_synchro_t) simcall_host_parallel_execute(const char *name, int host_nb, - smx_host_t *host_list, + sg_host_t *host_list, double *flops_amount, double *bytes_amount, double amount, @@ -341,29 +341,29 @@ XBT_PUBLIC(double) simcall_host_execution_get_remains(smx_synchro_t execution); XBT_PUBLIC(e_smx_state_t) simcall_host_execution_get_state(smx_synchro_t execution); XBT_PUBLIC(void) simcall_host_execution_set_priority(smx_synchro_t execution, double priority); XBT_PUBLIC(void) simcall_host_execution_set_bound(smx_synchro_t execution, double bound); -XBT_PUBLIC(void) simcall_host_execution_set_affinity(smx_synchro_t execution, smx_host_t host, unsigned long mask); +XBT_PUBLIC(void) simcall_host_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask); XBT_PUBLIC(e_smx_state_t) simcall_host_execution_wait(smx_synchro_t execution); -XBT_PUBLIC(xbt_dict_t) simcall_host_get_mounted_storage_list(smx_host_t host); -XBT_PUBLIC(xbt_dynar_t) simcall_host_get_attached_storage_list(smx_host_t host); -XBT_PUBLIC(void) simcall_host_get_params(smx_host_t vm, ws_params_t param); -XBT_PUBLIC(void) simcall_host_set_params(smx_host_t vm, ws_params_t param); +XBT_PUBLIC(xbt_dict_t) simcall_host_get_mounted_storage_list(sg_host_t host); +XBT_PUBLIC(xbt_dynar_t) simcall_host_get_attached_storage_list(sg_host_t host); +XBT_PUBLIC(void) simcall_host_get_params(sg_host_t vm, ws_params_t param); +XBT_PUBLIC(void) simcall_host_set_params(sg_host_t vm, ws_params_t param); /******************************* VM simcalls ********************************/ // Create the vm_workstation at the SURF level -XBT_PUBLIC(void*) simcall_vm_create(const char *name, smx_host_t host); -XBT_PUBLIC(int) simcall_vm_get_state(smx_host_t vm); -XBT_PUBLIC(void) simcall_vm_start(smx_host_t vm); -XBT_PUBLIC(void) simcall_vm_migrate(smx_host_t vm, smx_host_t dst_pm); -XBT_PUBLIC(void *) simcall_vm_get_pm(smx_host_t vm); -XBT_PUBLIC(void) simcall_vm_set_bound(smx_host_t vm, double bound); -XBT_PUBLIC(void) simcall_vm_set_affinity(smx_host_t vm, smx_host_t pm, unsigned long mask); -XBT_PUBLIC(void) simcall_vm_resume(smx_host_t vm); -XBT_PUBLIC(void) simcall_vm_migratefrom_resumeto(smx_host_t vm, smx_host_t src_pm, smx_host_t dst_pm); -XBT_PUBLIC(void) simcall_vm_save(smx_host_t vm); -XBT_PUBLIC(void) simcall_vm_restore(smx_host_t vm); -XBT_PUBLIC(void) simcall_vm_suspend(smx_host_t vm); -XBT_PUBLIC(void) simcall_vm_destroy(smx_host_t vm); -XBT_PUBLIC(void) simcall_vm_shutdown(smx_host_t vm); +XBT_PUBLIC(void*) simcall_vm_create(const char *name, sg_host_t host); +XBT_PUBLIC(int) simcall_vm_get_state(sg_host_t vm); +XBT_PUBLIC(void) simcall_vm_start(sg_host_t vm); +XBT_PUBLIC(void) simcall_vm_migrate(sg_host_t vm, sg_host_t dst_pm); +XBT_PUBLIC(void *) simcall_vm_get_pm(sg_host_t vm); +XBT_PUBLIC(void) simcall_vm_set_bound(sg_host_t vm, double bound); +XBT_PUBLIC(void) simcall_vm_set_affinity(sg_host_t vm, sg_host_t pm, unsigned long mask); +XBT_PUBLIC(void) simcall_vm_resume(sg_host_t vm); +XBT_PUBLIC(void) simcall_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm); +XBT_PUBLIC(void) simcall_vm_save(sg_host_t vm); +XBT_PUBLIC(void) simcall_vm_restore(sg_host_t vm); +XBT_PUBLIC(void) simcall_vm_suspend(sg_host_t vm); +XBT_PUBLIC(void) simcall_vm_destroy(sg_host_t vm); +XBT_PUBLIC(void) simcall_vm_shutdown(sg_host_t vm); /**************************** Process simcalls ********************************/ /* Constructor and Destructor */ @@ -385,7 +385,7 @@ XBT_PUBLIC(void) SIMIX_process_throw(smx_process_t process, xbt_errcat_t cat, in /* Process handling */ XBT_PUBLIC(void) simcall_process_cleanup(smx_process_t process); XBT_PUBLIC(void) simcall_process_change_host(smx_process_t process, - smx_host_t dest); + sg_host_t dest); XBT_PUBLIC(void) simcall_process_suspend(smx_process_t process); XBT_PUBLIC(void) simcall_process_resume(smx_process_t process); @@ -393,7 +393,7 @@ XBT_PUBLIC(void) simcall_process_resume(smx_process_t process); XBT_PUBLIC(int) simcall_process_count(void); XBT_PUBLIC(void *) simcall_process_get_data(smx_process_t process); XBT_PUBLIC(void) simcall_process_set_data(smx_process_t process, void *data); -XBT_PUBLIC(smx_host_t) simcall_process_get_host(smx_process_t process); +XBT_PUBLIC(sg_host_t) simcall_process_get_host(smx_process_t process); XBT_PUBLIC(const char *) simcall_process_get_name(smx_process_t process); XBT_PUBLIC(int) simcall_process_get_PID(smx_process_t process); XBT_PUBLIC(int) simcall_process_get_PPID(smx_process_t process); @@ -413,7 +413,7 @@ XBT_PUBLIC(e_smx_state_t) simcall_process_sleep(double duration); XBT_PUBLIC(smx_rdv_t) simcall_rdv_create(const char *name); XBT_PUBLIC(void) simcall_rdv_destroy(smx_rdv_t rvp); XBT_PUBLIC(smx_rdv_t) simcall_rdv_get_by_name(const char *name); -XBT_PUBLIC(int) simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host); +XBT_PUBLIC(int) simcall_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host); XBT_PUBLIC(smx_synchro_t) simcall_rdv_get_head(smx_rdv_t rdv); XBT_PUBLIC(smx_process_t) simcall_rdv_get_receiver(smx_rdv_t rdv); XBT_PUBLIC(void) simcall_rdv_set_receiver(smx_rdv_t rdv , smx_process_t process); @@ -503,11 +503,11 @@ XBT_PUBLIC(int) simcall_sem_get_capacity(smx_sem_t sem); /***************************** File **********************************/ XBT_PUBLIC(void *) simcall_file_get_data(smx_file_t fd); XBT_PUBLIC(void) simcall_file_set_data(smx_file_t fd, void *data); -XBT_PUBLIC(sg_size_t) simcall_file_read(smx_file_t fd, sg_size_t size, smx_host_t host); -XBT_PUBLIC(sg_size_t) simcall_file_write(smx_file_t fd, sg_size_t size, smx_host_t host); -XBT_PUBLIC(smx_file_t) simcall_file_open(const char* fullpath, smx_host_t host); -XBT_PUBLIC(int) simcall_file_close(smx_file_t fd, smx_host_t host); -XBT_PUBLIC(int) simcall_file_unlink(smx_file_t fd, smx_host_t host); +XBT_PUBLIC(sg_size_t) simcall_file_read(smx_file_t fd, sg_size_t size, sg_host_t host); +XBT_PUBLIC(sg_size_t) simcall_file_write(smx_file_t fd, sg_size_t size, sg_host_t host); +XBT_PUBLIC(smx_file_t) simcall_file_open(const char* fullpath, sg_host_t host); +XBT_PUBLIC(int) simcall_file_close(smx_file_t fd, sg_host_t host); +XBT_PUBLIC(int) simcall_file_unlink(smx_file_t fd, sg_host_t host); XBT_PUBLIC(sg_size_t) simcall_file_get_size(smx_file_t fd); XBT_PUBLIC(xbt_dynar_t) simcall_file_get_info(smx_file_t fd); XBT_PUBLIC(sg_size_t) simcall_file_tell(smx_file_t fd); diff --git a/src/bindings/lua/lua_platf.c b/src/bindings/lua/lua_platf.c index a985f6bc17..6606b42a37 100644 --- a/src/bindings/lua/lua_platf.c +++ b/src/bindings/lua/lua_platf.c @@ -64,7 +64,7 @@ int console_close(lua_State *L) { if(data[SURF_HOST_LEVEL]){ XBT_DEBUG("\tSee surf host %s",name); SIMIX_host_create(name, NULL); - __MSG_host_create((smx_host_t)data[SIMIX_HOST_LEVEL]); + __MSG_host_create((sg_host_t)data[SIMIX_HOST_LEVEL]); } } diff --git a/src/msg/msg_host.c b/src/msg/msg_host.c index 7da0e29d98..06e5a2551d 100644 --- a/src/msg/msg_host.c +++ b/src/msg/msg_host.c @@ -26,7 +26,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(msg); */ /********************************* Host **************************************/ -msg_host_t __MSG_host_create(smx_host_t host) +msg_host_t __MSG_host_create(sg_host_t host) { const char *name = SIMIX_host_get_name(host); msg_host_priv_t priv = xbt_new0(s_msg_host_priv_t, 1); diff --git a/src/msg/msg_private.h b/src/msg/msg_private.h index bd007ac8c9..4303aaf9ec 100644 --- a/src/msg/msg_private.h +++ b/src/msg/msg_private.h @@ -56,7 +56,7 @@ typedef struct simdata_task { void *isused; /* Indicates whether the task is used in SIMIX currently */ int host_nb; /* ==0 if sequential task; parallel task if not */ /******* Parallel Tasks Only !!!! *******/ - smx_host_t *host_list; + sg_host_t *host_list; double *flops_parallel_amount; double *bytes_parallel_amount; } s_simdata_task_t; @@ -154,7 +154,7 @@ XBT_PUBLIC_DATA(MSG_Global_t) msg_global; # define MSG_RETURN(val) return(val) #endif -msg_host_t __MSG_host_create(smx_host_t host); +msg_host_t __MSG_host_create(sg_host_t host); msg_storage_t __MSG_storage_create(smx_storage_t storage); void __MSG_host_destroy(msg_host_t host); void __MSG_storage_destroy(msg_storage_priv_t host); diff --git a/src/msg/msg_task.c b/src/msg/msg_task.c index c6055c5916..16a7fe59a1 100644 --- a/src/msg/msg_task.c +++ b/src/msg/msg_task.c @@ -107,7 +107,7 @@ MSG_parallel_task_create(const char *name, int host_nb, /* Simulator Data specific to parallel tasks */ simdata->host_nb = host_nb; - simdata->host_list = xbt_new0(smx_host_t, host_nb); + simdata->host_list = xbt_new0(sg_host_t, host_nb); simdata->flops_parallel_amount = flops_amount; simdata->bytes_parallel_amount = bytes_amount; diff --git a/src/simix/libsmx.c b/src/simix/libsmx.c index 0e63140dea..c26e995bf5 100644 --- a/src/simix/libsmx.c +++ b/src/simix/libsmx.c @@ -28,7 +28,7 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix); * \param name The name of the host to get * \return The corresponding host */ -smx_host_t simcall_host_get_by_name(const char *name) +sg_host_t simcall_host_get_by_name(const char *name) { return simcall_BODY_host_get_by_name(name); } @@ -40,7 +40,7 @@ smx_host_t simcall_host_get_by_name(const char *name) * \param host A SIMIX host * \return The name of this host */ -const char* simcall_host_get_name(smx_host_t host) +const char* simcall_host_get_name(sg_host_t host) { return simcall_BODY_host_get_name(host); } @@ -51,7 +51,7 @@ const char* simcall_host_get_name(smx_host_t host) * * \param host A SIMIX host */ -void simcall_host_on(smx_host_t host) +void simcall_host_on(sg_host_t host) { simcall_BODY_host_on(host); } @@ -62,7 +62,7 @@ void simcall_host_on(smx_host_t host) * * \param host A SIMIX host */ -void simcall_host_off(smx_host_t host) +void simcall_host_off(sg_host_t host) { simcall_BODY_host_off(host); } @@ -74,7 +74,7 @@ void simcall_host_off(smx_host_t host) * \param host A host * \return The properties of this host */ -xbt_dict_t simcall_host_get_properties(smx_host_t host) +xbt_dict_t simcall_host_get_properties(sg_host_t host) { return simcall_BODY_host_get_properties(host); } @@ -100,7 +100,7 @@ xbt_dict_t simcall_asr_get_properties(const char *name) * \param host A SIMIX host * \return The speed of this host (in Mflop/s) */ -double simcall_host_get_speed(smx_host_t host) +double simcall_host_get_speed(sg_host_t host) { return simcall_BODY_host_get_speed(host); } @@ -112,7 +112,7 @@ double simcall_host_get_speed(smx_host_t host) * \param host A SIMIX host * \return The number of core */ -int simcall_host_get_core(smx_host_t host) +int simcall_host_get_core(sg_host_t host) { return simcall_BODY_host_get_core(host); } @@ -124,7 +124,7 @@ int simcall_host_get_core(smx_host_t host) * \param host A SIMIX host * \return the swag of attached processes */ -xbt_swag_t simcall_host_get_process_list(smx_host_t host) +xbt_swag_t simcall_host_get_process_list(sg_host_t host) { return simcall_BODY_host_get_process_list(host); } @@ -136,7 +136,7 @@ xbt_swag_t simcall_host_get_process_list(smx_host_t host) * * \return Speed currently available (in Mflop/s) */ -double simcall_host_get_available_speed(smx_host_t host) +double simcall_host_get_available_speed(sg_host_t host) { return simcall_BODY_host_get_available_speed(host); } @@ -149,7 +149,7 @@ double simcall_host_get_available_speed(smx_host_t host) * \param host A SIMIX host * \return 1 if the host is available, 0 otherwise */ -int simcall_host_get_state(smx_host_t host) +int simcall_host_get_state(sg_host_t host) { return simcall_BODY_host_get_state(host); } @@ -161,7 +161,7 @@ int simcall_host_get_state(smx_host_t host) * \param host A SIMIX host * \return the current power peak value (double) */ -double simcall_host_get_current_power_peak(smx_host_t host) +double simcall_host_get_current_power_peak(sg_host_t host) { return simcall_BODY_host_get_current_power_peak(host); } @@ -174,7 +174,7 @@ double simcall_host_get_current_power_peak(smx_host_t host) * \param pstate_index pstate to test * \return the current power peak value (double) for pstate_index */ -double simcall_host_get_power_peak_at(smx_host_t host, int pstate_index) +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); } @@ -186,7 +186,7 @@ double simcall_host_get_power_peak_at(smx_host_t host, int pstate_index) * \param host A SIMIX host * \return the number of power states */ -int simcall_host_get_nb_pstates(smx_host_t host) +int simcall_host_get_nb_pstates(sg_host_t host) { return simcall_BODY_host_get_nb_pstates(host); } @@ -198,7 +198,7 @@ int simcall_host_get_nb_pstates(smx_host_t host) * \param host A SIMIX host * \param pstate_index The pstate to which the CPU power will be set */ -void simcall_host_set_pstate(smx_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); } @@ -208,7 +208,7 @@ void simcall_host_set_pstate(smx_host_t host, int pstate_index) * * \param host A SIMIX host */ -int simcall_host_get_pstate(smx_host_t host) +int simcall_host_get_pstate(sg_host_t host) { return simcall_BODY_host_get_pstate(host); } @@ -220,7 +220,7 @@ int simcall_host_get_pstate(smx_host_t host) * \param host A SIMIX host * \return the energy consumed by the host (double) */ -double simcall_host_get_consumed_energy(smx_host_t host) +double simcall_host_get_consumed_energy(sg_host_t host) { return simcall_BODY_host_get_consumed_energy(host); } @@ -254,7 +254,7 @@ double simcall_host_get_wattmax_at(msg_host_t host, int pstate){ * \param affinity_mask * \return A new SIMIX execution synchronization */ -smx_synchro_t simcall_host_execute(const char *name, smx_host_t host, +smx_synchro_t simcall_host_execute(const char *name, sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask) { @@ -282,7 +282,7 @@ smx_synchro_t simcall_host_execute(const char *name, smx_host_t host, */ smx_synchro_t simcall_host_parallel_execute(const char *name, int host_nb, - smx_host_t *host_list, + sg_host_t *host_list, double *flops_amount, double *bytes_amount, double amount, @@ -394,7 +394,7 @@ void simcall_host_execution_set_bound(smx_synchro_t execution, double bound) * \param host Host * \param mask Affinity mask */ -void simcall_host_execution_set_affinity(smx_synchro_t execution, smx_host_t host, unsigned long mask) +void simcall_host_execution_set_affinity(smx_synchro_t execution, sg_host_t host, unsigned long mask) { simcall_BODY_host_execution_set_affinity(execution, host, mask); } @@ -420,7 +420,7 @@ e_smx_state_t simcall_host_execution_wait(smx_synchro_t execution) * * \return The host object of the VM */ -void* simcall_vm_create(const char *name, smx_host_t phys_host){ +void* simcall_vm_create(const char *name, sg_host_t phys_host){ return simcall_BODY_vm_create(name, phys_host); } @@ -430,7 +430,7 @@ void* simcall_vm_create(const char *name, smx_host_t phys_host){ * * \param vm VM */ -void simcall_vm_start(smx_host_t vm) +void simcall_vm_start(sg_host_t vm) { simcall_BODY_vm_start(vm); } @@ -442,7 +442,7 @@ void simcall_vm_start(smx_host_t vm) * \param vm VM * \return The state of the VM */ -int simcall_vm_get_state(smx_host_t vm) +int simcall_vm_get_state(sg_host_t vm) { return simcall_BODY_vm_get_state(vm); } @@ -454,27 +454,27 @@ int simcall_vm_get_state(smx_host_t vm) * \param vm VM * \return The name of the physical host */ -void *simcall_vm_get_pm(smx_host_t vm) +void *simcall_vm_get_pm(sg_host_t vm) { return simcall_BODY_vm_get_pm(vm); } -void simcall_vm_set_bound(smx_host_t vm, double bound) +void simcall_vm_set_bound(sg_host_t vm, double bound) { simcall_BODY_vm_set_bound(vm, bound); } -void simcall_vm_set_affinity(smx_host_t vm, smx_host_t pm, unsigned long mask) +void simcall_vm_set_affinity(sg_host_t vm, sg_host_t pm, unsigned long mask) { simcall_BODY_vm_set_affinity(vm, pm, mask); } -void simcall_host_get_params(smx_host_t vm, ws_params_t params) +void simcall_host_get_params(sg_host_t vm, ws_params_t params) { simcall_BODY_host_get_params(vm, params); } -void simcall_host_set_params(smx_host_t vm, ws_params_t params) +void simcall_host_set_params(sg_host_t vm, ws_params_t params) { simcall_BODY_host_set_params(vm, params); } @@ -486,7 +486,7 @@ void simcall_host_set_params(smx_host_t vm, ws_params_t params) * \param vm VM * \param host Destination physical host */ -void simcall_vm_migrate(smx_host_t vm, smx_host_t host) +void simcall_vm_migrate(sg_host_t vm, sg_host_t host) { simcall_BODY_vm_migrate(vm, host); } @@ -497,7 +497,7 @@ void simcall_vm_migrate(smx_host_t vm, smx_host_t host) * * \param vm VM */ -void simcall_vm_suspend(smx_host_t vm) +void simcall_vm_suspend(sg_host_t vm) { simcall_BODY_vm_suspend(vm); } @@ -508,7 +508,7 @@ void simcall_vm_suspend(smx_host_t vm) * * \param vm VM */ -void simcall_vm_resume(smx_host_t vm) +void simcall_vm_resume(sg_host_t vm) { simcall_BODY_vm_resume(vm); } @@ -519,7 +519,7 @@ void simcall_vm_resume(smx_host_t vm) * * \param vm VM */ -void simcall_vm_save(smx_host_t vm) +void simcall_vm_save(sg_host_t vm) { simcall_BODY_vm_save(vm); } @@ -530,7 +530,7 @@ void simcall_vm_save(smx_host_t vm) * * \param vm VM */ -void simcall_vm_restore(smx_host_t vm) +void simcall_vm_restore(sg_host_t vm) { simcall_BODY_vm_restore(vm); } @@ -541,7 +541,7 @@ void simcall_vm_restore(smx_host_t vm) * * \param vm VM */ -void simcall_vm_shutdown(smx_host_t vm) +void simcall_vm_shutdown(sg_host_t vm) { simcall_BODY_vm_shutdown(vm); } @@ -552,7 +552,7 @@ void simcall_vm_shutdown(smx_host_t vm) * * \param vm VM */ -void simcall_vm_destroy(smx_host_t vm) +void simcall_vm_destroy(sg_host_t vm) { simcall_BODY_vm_destroy(vm); } @@ -571,7 +571,7 @@ void simcall_vm_destroy(smx_host_t vm) * \param src_pm Source physical host * \param dst_pmt Destination physical host */ -void simcall_vm_migratefrom_resumeto(smx_host_t vm, smx_host_t src_pm, smx_host_t dst_pm) +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); } @@ -649,7 +649,7 @@ void simcall_process_cleanup(smx_process_t process) * \param process the process to migrate * \param dest name of the new host */ -void simcall_process_change_host(smx_process_t process, smx_host_t dest) +void simcall_process_change_host(smx_process_t process, sg_host_t dest) { simcall_BODY_process_change_host(process, dest); } @@ -779,7 +779,7 @@ void simcall_process_set_kill_time(smx_process_t process, double kill_time) if (kill_time > SIMIX_get_clock()) { if (simix_global->kill_process_function) { XBT_DEBUG("Set kill time %f for process %s(%s)",kill_time, process->name, - sg_host_name(process->smx_host)); + sg_host_name(process->host)); process->kill_timer = SIMIX_timer_set(kill_time, simix_global->kill_process_function, process); } } @@ -789,12 +789,12 @@ void simcall_process_set_kill_time(smx_process_t process, double kill_time) * \ingroup simix_process_management * \brief Return the location on which an agent is running. * - * This functions returns the smx_host_t corresponding to the location on which + * This functions returns the sg_host_t corresponding to the location on which * \a process is running. * \param process SIMIX process * \return SIMIX host */ -smx_host_t simcall_process_get_host(smx_process_t process) +sg_host_t simcall_process_get_host(smx_process_t process) { return simcall_BODY_process_get_host(process); } @@ -929,7 +929,7 @@ smx_rdv_t simcall_rdv_get_by_name(const char *name) * \param host The host to be counted * \return The number of comm synchros pending in the rdv */ -int simcall_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) +int simcall_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host) { return simcall_BODY_rdv_comm_count_by_host(rdv, host); } @@ -1350,7 +1350,7 @@ int simcall_sem_get_capacity(smx_sem_t sem) * \ingroup simix_file_management * */ -sg_size_t simcall_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) +sg_size_t simcall_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) { return simcall_BODY_file_read(fd, size, host); } @@ -1359,7 +1359,7 @@ sg_size_t simcall_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) * \ingroup simix_file_management * */ -sg_size_t simcall_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) +sg_size_t simcall_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) { return simcall_BODY_file_write(fd, size, host); } @@ -1368,7 +1368,7 @@ sg_size_t simcall_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) * \ingroup simix_file_management * \brief */ -smx_file_t simcall_file_open(const char* fullpath, smx_host_t host) +smx_file_t simcall_file_open(const char* fullpath, sg_host_t host) { return simcall_BODY_file_open(fullpath, host); } @@ -1377,7 +1377,7 @@ smx_file_t simcall_file_open(const char* fullpath, smx_host_t host) * \ingroup simix_file_management * */ -int simcall_file_close(smx_file_t fd, smx_host_t host) +int simcall_file_close(smx_file_t fd, sg_host_t host) { return simcall_BODY_file_close(fd, host); } @@ -1386,7 +1386,7 @@ int simcall_file_close(smx_file_t fd, smx_host_t host) * \ingroup simix_file_management * */ -int simcall_file_unlink(smx_file_t fd, smx_host_t host) +int simcall_file_unlink(smx_file_t fd, sg_host_t host) { return simcall_BODY_file_unlink(fd, host); } @@ -1460,7 +1460,7 @@ sg_size_t simcall_storage_get_used_size (smx_storage_t storage){ * \param host A SIMIX host * \return a dict containing all storages mounted on the host */ -xbt_dict_t simcall_host_get_mounted_storage_list(smx_host_t host) +xbt_dict_t simcall_host_get_mounted_storage_list(sg_host_t host) { return simcall_BODY_host_get_mounted_storage_list(host); } @@ -1471,7 +1471,7 @@ xbt_dict_t simcall_host_get_mounted_storage_list(smx_host_t host) * \param host A SIMIX host * \return a dict containing all storages attached to the host */ -xbt_dynar_t simcall_host_get_attached_storage_list(smx_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); } diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index e16c91f01a..245fb0a050 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -20,15 +20,15 @@ static inline const char* simcall_host_get_by_name__get__name(smx_simcall_t simc static inline void simcall_host_get_by_name__set__name(smx_simcall_t simcall, const char* arg) { simcall->args[0].cc = arg; } -static inline smx_host_t simcall_host_get_by_name__get__result(smx_simcall_t simcall){ - return (smx_host_t) simcall->result.dp; +static inline sg_host_t simcall_host_get_by_name__get__result(smx_simcall_t simcall){ + return (sg_host_t) simcall->result.dp; } static inline void simcall_host_get_by_name__set__result(smx_simcall_t simcall, void* result){ simcall->result.dp = result; } -static inline smx_host_t simcall_host_get_name__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_host_get_name__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_host_get_name__set__host(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; @@ -40,22 +40,22 @@ static inline void simcall_host_get_name__set__result(smx_simcall_t simcall, con simcall->result.cc = result; } -static inline smx_host_t simcall_host_on__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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 smx_host_t simcall_host_off__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_host_off__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_host_off__set__host(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_host_get_properties__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -67,8 +67,8 @@ static inline void simcall_host_get_properties__set__result(smx_simcall_t simcal simcall->result.dp = result; } -static inline smx_host_t simcall_host_get_core__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_host_get_core__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_host_get_core__set__host(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; @@ -80,8 +80,8 @@ static inline void simcall_host_get_core__set__result(smx_simcall_t simcall, int simcall->result.i = result; } -static inline smx_host_t simcall_host_get_process_list__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -93,8 +93,8 @@ static inline void simcall_host_get_process_list__set__result(smx_simcall_t simc simcall->result.dp = result; } -static inline smx_host_t simcall_host_get_speed__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_host_get_speed__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_host_get_speed__set__host(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; @@ -106,8 +106,8 @@ static inline void simcall_host_get_speed__set__result(smx_simcall_t simcall, do simcall->result.d = result; } -static inline smx_host_t simcall_host_get_available_speed__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_host_get_available_speed__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_host_get_available_speed__set__host(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; @@ -119,8 +119,8 @@ static inline void simcall_host_get_available_speed__set__result(smx_simcall_t s simcall->result.d = result; } -static inline smx_host_t simcall_host_get_state__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_host_get_state__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_host_get_state__set__host(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; @@ -132,8 +132,8 @@ static inline void simcall_host_get_state__set__result(smx_simcall_t simcall, in simcall->result.i = result; } -static inline smx_host_t simcall_host_get_current_power_peak__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -145,8 +145,8 @@ static inline void simcall_host_get_current_power_peak__set__result(smx_simcall_ simcall->result.d = result; } -static inline smx_host_t simcall_host_get_power_peak_at__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -164,8 +164,8 @@ static inline void simcall_host_get_power_peak_at__set__result(smx_simcall_t sim simcall->result.d = result; } -static inline smx_host_t simcall_host_get_nb_pstates__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_host_get_nb_pstates__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_host_get_nb_pstates__set__host(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; @@ -177,8 +177,8 @@ static inline void simcall_host_get_nb_pstates__set__result(smx_simcall_t simcal simcall->result.i = result; } -static inline smx_host_t simcall_host_get_wattmin_at__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -196,8 +196,8 @@ static inline void simcall_host_get_wattmin_at__set__result(smx_simcall_t simcal simcall->result.d = result; } -static inline smx_host_t simcall_host_get_wattmax_at__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -215,8 +215,8 @@ static inline void simcall_host_get_wattmax_at__set__result(smx_simcall_t simcal simcall->result.d = result; } -static inline smx_host_t simcall_host_set_pstate__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -228,8 +228,8 @@ static inline void simcall_host_set_pstate__set__pstate_index(smx_simcall_t simc simcall->args[1].i = arg; } -static inline smx_host_t simcall_host_get_pstate__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_host_get_pstate__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_host_get_pstate__set__host(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; @@ -241,8 +241,8 @@ static inline void simcall_host_get_pstate__set__result(smx_simcall_t simcall, i simcall->result.i = result; } -static inline smx_host_t simcall_host_get_consumed_energy__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_host_get_consumed_energy__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_host_get_consumed_energy__set__host(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; @@ -260,8 +260,8 @@ static inline const char* simcall_host_execute__get__name(smx_simcall_t simcall) static inline void simcall_host_execute__set__name(smx_simcall_t simcall, const char* arg) { simcall->args[0].cc = arg; } -static inline smx_host_t simcall_host_execute__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +static inline sg_host_t simcall_host_execute__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[1].dp; } static inline void simcall_host_execute__set__host(smx_simcall_t simcall, void* arg) { simcall->args[1].dp = arg; @@ -309,8 +309,8 @@ static inline int simcall_host_parallel_execute__get__host_nb(smx_simcall_t simc static inline void simcall_host_parallel_execute__set__host_nb(smx_simcall_t simcall, int arg) { simcall->args[1].i = arg; } -static inline smx_host_t* simcall_host_parallel_execute__get__host_list(smx_simcall_t simcall) { - return (smx_host_t*) simcall->args[2].dp; +static inline sg_host_t* simcall_host_parallel_execute__get__host_list(smx_simcall_t simcall) { + return (sg_host_t*) simcall->args[2].dp; } static inline void simcall_host_parallel_execute__set__host_list(smx_simcall_t simcall, void* arg) { simcall->args[2].dp = arg; @@ -418,8 +418,8 @@ static inline smx_synchro_t simcall_host_execution_set_affinity__get__execution( static inline void simcall_host_execution_set_affinity__set__execution(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_host_execution_set_affinity__get__ws(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +static inline sg_host_t simcall_host_execution_set_affinity__get__ws(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[1].dp; } static inline void simcall_host_execution_set_affinity__set__ws(smx_simcall_t simcall, void* arg) { simcall->args[1].dp = arg; @@ -444,8 +444,8 @@ static inline void simcall_host_execution_wait__set__result(smx_simcall_t simcal simcall->result.i = result; } -static inline smx_host_t simcall_host_get_mounted_storage_list__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -457,8 +457,8 @@ static inline void simcall_host_get_mounted_storage_list__set__result(smx_simcal simcall->result.dp = result; } -static inline smx_host_t simcall_host_get_attached_storage_list__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -470,8 +470,8 @@ static inline void simcall_host_get_attached_storage_list__set__result(smx_simca simcall->result.dp = result; } -static inline smx_host_t simcall_host_get_params__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -483,8 +483,8 @@ static inline void simcall_host_get_params__set__params(smx_simcall_t simcall, v simcall->args[1].dp = arg; } -static inline smx_host_t simcall_host_set_params__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -502,28 +502,28 @@ static inline const char* simcall_vm_create__get__name(smx_simcall_t simcall) { static inline void simcall_vm_create__set__name(smx_simcall_t simcall, const char* arg) { simcall->args[0].cc = arg; } -static inline smx_host_t simcall_vm_create__get__ind_pm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +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 smx_host_t simcall_vm_create__get__result(smx_simcall_t simcall){ - return (smx_host_t) simcall->result.dp; +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 smx_host_t simcall_vm_start__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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 smx_host_t simcall_vm_get_state__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -535,21 +535,21 @@ static inline void simcall_vm_get_state__set__result(smx_simcall_t simcall, int simcall->result.i = result; } -static inline smx_host_t simcall_vm_migrate__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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 smx_host_t simcall_vm_migrate__get__ind_dst_pm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +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 smx_host_t simcall_vm_get_pm__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -561,8 +561,8 @@ static inline void simcall_vm_get_pm__set__result(smx_simcall_t simcall, void* r simcall->result.dp = result; } -static inline smx_host_t simcall_vm_set_bound__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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; @@ -574,14 +574,14 @@ static inline void simcall_vm_set_bound__set__bound(smx_simcall_t simcall, doubl simcall->args[1].d = arg; } -static inline smx_host_t simcall_vm_set_affinity__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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 smx_host_t simcall_vm_set_affinity__get__ind_pm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +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; @@ -593,62 +593,62 @@ static inline void simcall_vm_set_affinity__set__mask(smx_simcall_t simcall, uns simcall->args[2].ul = arg; } -static inline smx_host_t simcall_vm_destroy__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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 smx_host_t simcall_vm_suspend__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_vm_suspend__get__ind_vm(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_vm_suspend__set__ind_vm(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_vm_resume__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_vm_resume__get__ind_vm(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_vm_resume__set__ind_vm(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_vm_shutdown__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_vm_shutdown__get__ind_vm(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_vm_shutdown__set__ind_vm(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_vm_save__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_vm_save__get__ind_vm(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_vm_save__set__ind_vm(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_vm_restore__get__ind_vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +static inline sg_host_t simcall_vm_restore__get__ind_vm(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[0].dp; } static inline void simcall_vm_restore__set__ind_vm(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_vm_migratefrom_resumeto__get__vm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[0].dp; +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 smx_host_t simcall_vm_migratefrom_resumeto__get__src_pm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +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 smx_host_t simcall_vm_migratefrom_resumeto__get__dst_pm(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[2].dp; +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; @@ -742,8 +742,8 @@ static inline smx_process_t simcall_process_change_host__get__process(smx_simcal static inline void simcall_process_change_host__set__process(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_process_change_host__get__dest(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +static inline sg_host_t simcall_process_change_host__get__dest(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[1].dp; } static inline void simcall_process_change_host__set__dest(smx_simcall_t simcall, void* arg) { simcall->args[1].dp = arg; @@ -828,8 +828,8 @@ static inline smx_process_t simcall_process_get_host__get__process(smx_simcall_t static inline void simcall_process_get_host__set__process(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_process_get_host__get__result(smx_simcall_t simcall){ - return (smx_host_t) simcall->result.dp; +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; @@ -977,8 +977,8 @@ static inline smx_rdv_t simcall_rdv_comm_count_by_host__get__rdv(smx_simcall_t s static inline void simcall_rdv_comm_count_by_host__set__rdv(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_rdv_comm_count_by_host__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +static inline sg_host_t simcall_rdv_comm_count_by_host__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[1].dp; } static inline void simcall_rdv_comm_count_by_host__set__host(smx_simcall_t simcall, void* arg) { simcall->args[1].dp = arg; @@ -1627,8 +1627,8 @@ static inline sg_size_t simcall_file_read__get__size(smx_simcall_t simcall) { static inline void simcall_file_read__set__size(smx_simcall_t simcall, sg_size_t arg) { simcall->args[1].sgsz = arg; } -static inline smx_host_t simcall_file_read__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[2].dp; +static inline sg_host_t simcall_file_read__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[2].dp; } static inline void simcall_file_read__set__host(smx_simcall_t simcall, void* arg) { simcall->args[2].dp = arg; @@ -1652,8 +1652,8 @@ static inline sg_size_t simcall_file_write__get__size(smx_simcall_t simcall) { static inline void simcall_file_write__set__size(smx_simcall_t simcall, sg_size_t arg) { simcall->args[1].sgsz = arg; } -static inline smx_host_t simcall_file_write__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[2].dp; +static inline sg_host_t simcall_file_write__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[2].dp; } static inline void simcall_file_write__set__host(smx_simcall_t simcall, void* arg) { simcall->args[2].dp = arg; @@ -1671,8 +1671,8 @@ static inline const char* simcall_file_open__get__fullpath(smx_simcall_t simcall static inline void simcall_file_open__set__fullpath(smx_simcall_t simcall, const char* arg) { simcall->args[0].cc = arg; } -static inline smx_host_t simcall_file_open__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +static inline sg_host_t simcall_file_open__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[1].dp; } static inline void simcall_file_open__set__host(smx_simcall_t simcall, void* arg) { simcall->args[1].dp = arg; @@ -1690,8 +1690,8 @@ static inline smx_file_t simcall_file_close__get__fd(smx_simcall_t simcall) { static inline void simcall_file_close__set__fd(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_file_close__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +static inline sg_host_t simcall_file_close__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[1].dp; } static inline void simcall_file_close__set__host(smx_simcall_t simcall, void* arg) { simcall->args[1].dp = arg; @@ -1709,8 +1709,8 @@ static inline smx_file_t simcall_file_unlink__get__fd(smx_simcall_t simcall) { static inline void simcall_file_unlink__set__fd(smx_simcall_t simcall, void* arg) { simcall->args[0].dp = arg; } -static inline smx_host_t simcall_file_unlink__get__host(smx_simcall_t simcall) { - return (smx_host_t) simcall->args[1].dp; +static inline sg_host_t simcall_file_unlink__get__host(smx_simcall_t simcall) { + return (sg_host_t) simcall->args[1].dp; } static inline void simcall_file_unlink__set__host(smx_simcall_t simcall, void* arg) { simcall->args[1].dp = arg; @@ -1949,17 +1949,17 @@ static inline void simcall_mc_compare_snapshots__set__result(smx_simcall_t simca /* The prototype of all simcall handlers, automatically generated for you */ -void simcall_HANDLER_host_off(smx_simcall_t simcall, smx_host_t host); +void simcall_HANDLER_host_off(smx_simcall_t simcall, sg_host_t host); void simcall_HANDLER_host_execution_wait(smx_simcall_t simcall, smx_synchro_t execution); -void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm); -void simcall_HANDLER_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm); -void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm); -void simcall_HANDLER_vm_save(smx_simcall_t simcall, smx_host_t ind_vm); -void simcall_HANDLER_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm); +void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, sg_host_t ind_vm); +void simcall_HANDLER_vm_resume(smx_simcall_t simcall, sg_host_t ind_vm); +void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, sg_host_t ind_vm); +void simcall_HANDLER_vm_save(smx_simcall_t simcall, sg_host_t ind_vm); +void simcall_HANDLER_vm_restore(smx_simcall_t simcall, sg_host_t ind_vm); void simcall_HANDLER_process_create(smx_simcall_t simcall, smx_process_t* process, const char* name, xbt_main_func_t code, void* data, const char* hostname, double kill_time, int argc, char** argv, xbt_dict_t properties, int auto_restart); void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_process_t process); void simcall_HANDLER_process_killall(smx_simcall_t simcall, int reset_pid); -void simcall_HANDLER_process_change_host(smx_simcall_t simcall, smx_process_t process, smx_host_t dest); +void simcall_HANDLER_process_change_host(smx_simcall_t simcall, smx_process_t process, sg_host_t dest); void simcall_HANDLER_process_suspend(smx_simcall_t simcall, smx_process_t process); void simcall_HANDLER_process_resume(smx_simcall_t simcall, smx_process_t process); void simcall_HANDLER_process_join(smx_simcall_t simcall, smx_process_t process, double timeout); @@ -1985,10 +1985,10 @@ int simcall_HANDLER_sem_would_block(smx_simcall_t simcall, smx_sem_t sem); void simcall_HANDLER_sem_acquire(smx_simcall_t simcall, smx_sem_t sem); void simcall_HANDLER_sem_acquire_timeout(smx_simcall_t simcall, smx_sem_t sem, double timeout); int simcall_HANDLER_sem_get_capacity(smx_simcall_t simcall, smx_sem_t sem); -void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host); -void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host); -void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host); -void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host); +void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, sg_host_t host); +void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, sg_host_t host); +void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, sg_host_t host); +void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, sg_host_t host); sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd); sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd); int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t offset, int origin); diff --git a/src/simix/popping_bodies.c b/src/simix/popping_bodies.c index 6f0afeeda4..dd5580aeb4 100644 --- a/src/simix/popping_bodies.c +++ b/src/simix/popping_bodies.c @@ -17,7 +17,7 @@ #include "mc/mc_forward.h" #include "xbt/ex.h" -inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) { +inline static sg_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 */ @@ -38,7 +38,7 @@ inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) { 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(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -59,7 +59,7 @@ inline static const char* simcall_BODY_host_get_name(smx_host_t host) { return self->simcall.result.cc; } -inline static void simcall_BODY_host_on(smx_host_t host) { +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 */ @@ -80,7 +80,7 @@ inline static void simcall_BODY_host_on(smx_host_t host) { } -inline static void simcall_BODY_host_off(smx_host_t host) { +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 */ @@ -101,7 +101,7 @@ inline static void simcall_BODY_host_off(smx_host_t host) { } -inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) { +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 */ @@ -122,7 +122,7 @@ inline static xbt_dict_t simcall_BODY_host_get_properties(smx_host_t host) { 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(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -143,7 +143,7 @@ inline static int simcall_BODY_host_get_core(smx_host_t host) { 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(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -164,7 +164,7 @@ inline static xbt_swag_t simcall_BODY_host_get_process_list(smx_host_t host) { 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(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -185,7 +185,7 @@ inline static double simcall_BODY_host_get_speed(smx_host_t host) { 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(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -206,7 +206,7 @@ inline static double simcall_BODY_host_get_available_speed(smx_host_t host) { 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(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -227,7 +227,7 @@ inline static int simcall_BODY_host_get_state(smx_host_t host) { 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(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -248,7 +248,7 @@ inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) { 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(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 */ @@ -270,7 +270,7 @@ inline static double simcall_BODY_host_get_power_peak_at(smx_host_t host, int ps 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(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -291,7 +291,7 @@ inline static int simcall_BODY_host_get_nb_pstates(smx_host_t host) { return self->simcall.result.i; } -inline static double simcall_BODY_host_get_wattmin_at(smx_host_t host, int pstate_index) { +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 */ @@ -313,7 +313,7 @@ inline static double simcall_BODY_host_get_wattmin_at(smx_host_t host, int pstat return self->simcall.result.d; } -inline static double simcall_BODY_host_get_wattmax_at(smx_host_t host, int pstate_index) { +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 */ @@ -335,7 +335,7 @@ inline static double simcall_BODY_host_get_wattmax_at(smx_host_t host, int pstat return self->simcall.result.d; } -inline static void simcall_BODY_host_set_pstate(smx_host_t host, int pstate_index) { +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 */ @@ -357,7 +357,7 @@ inline static void simcall_BODY_host_set_pstate(smx_host_t host, int pstate_inde } -inline static int simcall_BODY_host_get_pstate(smx_host_t host) { +inline static int simcall_BODY_host_get_pstate(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -378,7 +378,7 @@ inline static int simcall_BODY_host_get_pstate(smx_host_t host) { return self->simcall.result.i; } -inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) { +inline static double simcall_BODY_host_get_consumed_energy(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -399,7 +399,7 @@ inline static double simcall_BODY_host_get_consumed_energy(smx_host_t host) { return self->simcall.result.d; } -inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask) { +inline static smx_synchro_t simcall_BODY_host_execute(const char* name, sg_host_t host, double flops_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 */ @@ -425,7 +425,7 @@ inline static smx_synchro_t simcall_BODY_host_execute(const char* name, smx_host return self->simcall.result.dp; } -inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, smx_host_t* host_list, double* flops_amount, double* bytes_amount, double amount, double rate) { +inline static smx_synchro_t simcall_BODY_host_parallel_execute(const char* name, int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_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 */ @@ -580,7 +580,7 @@ inline static void simcall_BODY_host_execution_set_bound(smx_synchro_t execution } -inline static void simcall_BODY_host_execution_set_affinity(smx_synchro_t execution, smx_host_t ws, unsigned long mask) { +inline static void simcall_BODY_host_execution_set_affinity(smx_synchro_t execution, sg_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 */ @@ -624,7 +624,7 @@ inline static int simcall_BODY_host_execution_wait(smx_synchro_t execution) { 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(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -645,7 +645,7 @@ inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t h 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(sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -666,7 +666,7 @@ inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t 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(sg_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 */ @@ -688,7 +688,7 @@ inline static void simcall_BODY_host_get_params(smx_host_t ind_vm, ws_params_t p } -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(sg_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 */ @@ -710,7 +710,7 @@ inline static void simcall_BODY_host_set_params(smx_host_t ind_vm, ws_params_t p } -inline static smx_host_t simcall_BODY_vm_create(const char* name, smx_host_t ind_pm) { +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 */ @@ -732,7 +732,7 @@ inline static smx_host_t simcall_BODY_vm_create(const char* name, smx_host_t ind return self->simcall.result.dp; } -inline static void simcall_BODY_vm_start(smx_host_t ind_vm) { +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 */ @@ -753,7 +753,7 @@ inline static void simcall_BODY_vm_start(smx_host_t ind_vm) { } -inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) { +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 */ @@ -774,7 +774,7 @@ inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) { 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(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 */ @@ -796,7 +796,7 @@ inline static void simcall_BODY_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst } -inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) { +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 */ @@ -817,7 +817,7 @@ inline static void* simcall_BODY_vm_get_pm(smx_host_t ind_vm) { 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(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 */ @@ -839,7 +839,7 @@ inline static void simcall_BODY_vm_set_bound(smx_host_t ind_vm, double bound) { } -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(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 */ @@ -862,7 +862,7 @@ inline static void simcall_BODY_vm_set_affinity(smx_host_t ind_vm, smx_host_t in } -inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) { +inline static void simcall_BODY_vm_destroy(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 */ @@ -883,7 +883,7 @@ inline static void simcall_BODY_vm_destroy(smx_host_t ind_vm) { } -inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) { +inline static void simcall_BODY_vm_suspend(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 */ @@ -904,7 +904,7 @@ inline static void simcall_BODY_vm_suspend(smx_host_t ind_vm) { } -inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) { +inline static void simcall_BODY_vm_resume(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 */ @@ -925,7 +925,7 @@ inline static void simcall_BODY_vm_resume(smx_host_t ind_vm) { } -inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) { +inline static void simcall_BODY_vm_shutdown(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 */ @@ -946,7 +946,7 @@ inline static void simcall_BODY_vm_shutdown(smx_host_t ind_vm) { } -inline static void simcall_BODY_vm_save(smx_host_t ind_vm) { +inline static void simcall_BODY_vm_save(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 */ @@ -967,7 +967,7 @@ inline static void simcall_BODY_vm_save(smx_host_t ind_vm) { } -inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) { +inline static void simcall_BODY_vm_restore(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 */ @@ -988,7 +988,7 @@ inline static void simcall_BODY_vm_restore(smx_host_t ind_vm) { } -inline static void simcall_BODY_vm_migratefrom_resumeto(smx_host_t vm, smx_host_t src_pm, smx_host_t dst_pm) { +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 */ @@ -1104,7 +1104,7 @@ inline static void simcall_BODY_process_cleanup(smx_process_t process) { } -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, sg_host_t dest) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -1274,7 +1274,7 @@ inline static void simcall_BODY_process_set_data(smx_process_t process, void* da } -inline static smx_host_t simcall_BODY_process_get_host(smx_process_t process) { +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 */ @@ -1509,7 +1509,7 @@ inline static void simcall_BODY_rdv_destroy(smx_rdv_t rdv) { } -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, sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -2351,7 +2351,7 @@ inline static int simcall_BODY_sem_get_capacity(smx_sem_t sem) { 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, sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -2374,7 +2374,7 @@ inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, sm 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, sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -2397,7 +2397,7 @@ inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, s 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, sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -2419,7 +2419,7 @@ inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t 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, sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ @@ -2441,7 +2441,7 @@ inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) { 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, sg_host_t host) { smx_process_t self = SIMIX_process_self(); /* Go to that function to follow the code flow through the simcall barrier */ diff --git a/src/simix/popping_generated.c b/src/simix/popping_generated.c index d7eb3668c1..d3f238865f 100644 --- a/src/simix/popping_generated.c +++ b/src/simix/popping_generated.c @@ -174,97 +174,97 @@ case SIMCALL_HOST_GET_BY_NAME: break; case SIMCALL_HOST_GET_NAME: - simcall->result.cc = SIMIX_host_get_name((smx_host_t) simcall->args[0].dp); + simcall->result.cc = SIMIX_host_get_name((sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_ON: - SIMIX_host_on((smx_host_t) simcall->args[0].dp); + SIMIX_host_on((sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_OFF: - simcall_HANDLER_host_off(simcall , (smx_host_t) simcall->args[0].dp); + 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((smx_host_t) simcall->args[0].dp); + simcall->result.dp = SIMIX_host_get_properties((sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_CORE: - simcall->result.i = SIMIX_host_get_core((smx_host_t) simcall->args[0].dp); + simcall->result.i = SIMIX_host_get_core((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((smx_host_t) simcall->args[0].dp); + simcall->result.dp = SIMIX_host_get_process_list((sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_SPEED: - simcall->result.d = SIMIX_host_get_speed((smx_host_t) simcall->args[0].dp); + simcall->result.d = SIMIX_host_get_speed((sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_AVAILABLE_SPEED: - simcall->result.d = SIMIX_host_get_available_speed((smx_host_t) simcall->args[0].dp); + simcall->result.d = SIMIX_host_get_available_speed((sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_STATE: - simcall->result.i = SIMIX_host_get_state((smx_host_t) simcall->args[0].dp); + simcall->result.i = SIMIX_host_get_state((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((smx_host_t) simcall->args[0].dp); + 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((smx_host_t) simcall->args[0].dp, simcall->args[1].i); + 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_NB_PSTATES: - simcall->result.i = SIMIX_host_get_nb_pstates((smx_host_t) simcall->args[0].dp); + simcall->result.i = SIMIX_host_get_nb_pstates((sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_WATTMIN_AT: - simcall->result.d = SIMIX_host_get_wattmin_at((smx_host_t) simcall->args[0].dp, simcall->args[1].i); + 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((smx_host_t) simcall->args[0].dp, simcall->args[1].i); + 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((smx_host_t) simcall->args[0].dp, simcall->args[1].i); + SIMIX_host_set_pstate((sg_host_t) simcall->args[0].dp, simcall->args[1].i); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_PSTATE: - simcall->result.i = SIMIX_host_get_pstate((smx_host_t) simcall->args[0].dp); + simcall->result.i = SIMIX_host_get_pstate((sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_GET_CONSUMED_ENERGY: - simcall->result.d = SIMIX_host_get_consumed_energy((smx_host_t) simcall->args[0].dp); + simcall->result.d = SIMIX_host_get_consumed_energy((sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_EXECUTE: - simcall->result.dp = SIMIX_host_execute( simcall->args[0].cc,(smx_host_t) simcall->args[1].dp, simcall->args[2].d, simcall->args[3].d, simcall->args[4].d, simcall->args[5].ul); + simcall->result.dp = SIMIX_host_execute( simcall->args[0].cc,(sg_host_t) simcall->args[1].dp, simcall->args[2].d, simcall->args[3].d, simcall->args[4].d, simcall->args[5].ul); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_PARALLEL_EXECUTE: - simcall->result.dp = SIMIX_host_parallel_execute( simcall->args[0].cc, simcall->args[1].i,(smx_host_t*) simcall->args[2].dp,(double*) simcall->args[3].dp,(double*) simcall->args[4].dp, simcall->args[5].d, simcall->args[6].d); + simcall->result.dp = SIMIX_host_parallel_execute( simcall->args[0].cc, simcall->args[1].i,(sg_host_t*) simcall->args[2].dp,(double*) simcall->args[3].dp,(double*) simcall->args[4].dp, simcall->args[5].d, simcall->args[6].d); SIMIX_simcall_answer(simcall); break; @@ -299,7 +299,7 @@ case SIMCALL_HOST_EXECUTION_SET_BOUND: break; case SIMCALL_HOST_EXECUTION_SET_AFFINITY: - SIMIX_host_execution_set_affinity((smx_synchro_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp, simcall->args[2].ul); + SIMIX_host_execution_set_affinity((smx_synchro_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp, simcall->args[2].ul); SIMIX_simcall_answer(simcall); break; @@ -308,92 +308,92 @@ case SIMCALL_HOST_EXECUTION_WAIT: break; case SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST: - simcall->result.dp = SIMIX_host_get_mounted_storage_list((smx_host_t) simcall->args[0].dp); + 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((smx_host_t) simcall->args[0].dp); + 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((smx_host_t) simcall->args[0].dp,(ws_params_t) simcall->args[1].dp); + SIMIX_host_get_params((sg_host_t) simcall->args[0].dp,(ws_params_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_HOST_SET_PARAMS: - SIMIX_host_set_params((smx_host_t) simcall->args[0].dp,(ws_params_t) simcall->args[1].dp); + SIMIX_host_set_params((sg_host_t) simcall->args[0].dp,(ws_params_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_CREATE: - simcall->result.dp = SIMIX_vm_create( simcall->args[0].cc,(smx_host_t) simcall->args[1].dp); + 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((smx_host_t) simcall->args[0].dp); + 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((smx_host_t) simcall->args[0].dp); + 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((smx_host_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp); + 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((smx_host_t) simcall->args[0].dp); + 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((smx_host_t) simcall->args[0].dp, simcall->args[1].d); + 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((smx_host_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp, simcall->args[2].ul); + 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((smx_host_t) simcall->args[0].dp); + SIMIX_vm_destroy((sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_SUSPEND: - simcall_HANDLER_vm_suspend(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_suspend(simcall , (sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_RESUME: - simcall_HANDLER_vm_resume(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_resume(simcall , (sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_SHUTDOWN: - simcall_HANDLER_vm_shutdown(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_shutdown(simcall , (sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_SAVE: - simcall_HANDLER_vm_save(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_save(simcall , (sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_RESTORE: - simcall_HANDLER_vm_restore(simcall , (smx_host_t) simcall->args[0].dp); + simcall_HANDLER_vm_restore(simcall , (sg_host_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); break; case SIMCALL_VM_MIGRATEFROM_RESUMETO: - SIMIX_vm_migratefrom_resumeto((smx_host_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp,(smx_host_t) simcall->args[2].dp); + 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; @@ -418,7 +418,7 @@ case SIMCALL_PROCESS_CLEANUP: break; case SIMCALL_PROCESS_CHANGE_HOST: - simcall_HANDLER_process_change_host(simcall , (smx_process_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); + simcall_HANDLER_process_change_host(simcall , (smx_process_t) simcall->args[0].dp, (sg_host_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; @@ -510,7 +510,7 @@ case SIMCALL_RDV_DESTROY: break; case SIMCALL_RDV_COMM_COUNT_BY_HOST: - simcall->result.ui = SIMIX_rdv_comm_count_by_host((smx_rdv_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp); + simcall->result.ui = SIMIX_rdv_comm_count_by_host((smx_rdv_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; @@ -689,23 +689,23 @@ case SIMCALL_SEM_GET_CAPACITY: break; case SIMCALL_FILE_READ: - simcall_HANDLER_file_read(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].sgsz, (smx_host_t) simcall->args[2].dp); + simcall_HANDLER_file_read(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].sgsz, (sg_host_t) simcall->args[2].dp); break; case SIMCALL_FILE_WRITE: - simcall_HANDLER_file_write(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].sgsz, (smx_host_t) simcall->args[2].dp); + simcall_HANDLER_file_write(simcall , (smx_file_t) simcall->args[0].dp, simcall->args[1].sgsz, (sg_host_t) simcall->args[2].dp); break; case SIMCALL_FILE_OPEN: - simcall_HANDLER_file_open(simcall , simcall->args[0].cc, (smx_host_t) simcall->args[1].dp); + simcall_HANDLER_file_open(simcall , simcall->args[0].cc, (sg_host_t) simcall->args[1].dp); break; case SIMCALL_FILE_CLOSE: - simcall_HANDLER_file_close(simcall , (smx_file_t) simcall->args[0].dp, (smx_host_t) simcall->args[1].dp); + simcall_HANDLER_file_close(simcall , (smx_file_t) simcall->args[0].dp, (sg_host_t) simcall->args[1].dp); break; case SIMCALL_FILE_UNLINK: - simcall->result.i = SIMIX_file_unlink((smx_file_t) simcall->args[0].dp,(smx_host_t) simcall->args[1].dp); + simcall->result.i = SIMIX_file_unlink((smx_file_t) simcall->args[0].dp,(sg_host_t) simcall->args[1].dp); SIMIX_simcall_answer(simcall); break; diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index 44465ba4e2..5694e6dbc1 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -46,58 +46,58 @@ # ./include/simgrid/simix.h (otherwise you will get a warning at the # compilation time) -Func - host_get_by_name (void*, smx_host_t) (name, const char*) -Func - host_get_name (const char*) (host, void*, smx_host_t) -Proc - host_on (void) (host, void*, smx_host_t) -Proc H host_off (void) (host, void*, smx_host_t) -Func - host_get_properties (void*, xbt_dict_t) (host, void*, smx_host_t) -Func - host_get_core (int) (host, void*, smx_host_t) -Func - host_get_process_list (void*, xbt_swag_t) (host, void*, smx_host_t) -Func - host_get_speed (double) (host, void*, smx_host_t) -Func - host_get_available_speed (double) (host, void*, smx_host_t) -Func - host_get_state (int) (host, void*, smx_host_t) -Func - host_get_current_power_peak (double) (host, void*, smx_host_t) -Func - host_get_power_peak_at (double) (host, void*, smx_host_t) (pstate_index, int) -Func - host_get_nb_pstates (int) (host, void*, smx_host_t) -Func - host_get_wattmin_at (double) (host, void*, smx_host_t) (pstate_index, int) -Func - host_get_wattmax_at (double) (host, void*, smx_host_t) (pstate_index, int) -Proc - host_set_pstate (void) (host, void*, smx_host_t) (pstate_index, int) -Func - host_get_pstate (int) (host, void*, smx_host_t) -Func - host_get_consumed_energy (double) (host, void*, smx_host_t) +Func - host_get_by_name (void*, sg_host_t) (name, const char*) +Func - host_get_name (const char*) (host, void*, sg_host_t) +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_core (int) (host, void*, sg_host_t) +Func - host_get_process_list (void*, xbt_swag_t) (host, void*, sg_host_t) +Func - host_get_speed (double) (host, void*, sg_host_t) +Func - host_get_available_speed (double) (host, void*, sg_host_t) +Func - host_get_state (int) (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_nb_pstates (int) (host, void*, sg_host_t) +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_pstate (int) (host, void*, sg_host_t) +Func - host_get_consumed_energy (double) (host, void*, sg_host_t) -Func - host_execute (void*, smx_synchro_t) (name, const char*) (host, void*, smx_host_t) (flops_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long) -Func - host_parallel_execute (void*, smx_synchro_t) (name, const char*) (host_nb, int) (host_list, void*, smx_host_t*) (flops_amount, void*, double*) (bytes_amount, void*, double*) (amount, double) (rate, double) +Func - host_execute (void*, smx_synchro_t) (name, const char*) (host, void*, sg_host_t) (flops_amount, double) (priority, double) (bound, double) (affinity_mask, unsigned long) +Func - host_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 - host_execution_destroy (void) (execution, void*, smx_synchro_t) Proc - host_execution_cancel (void) (execution, void*, smx_synchro_t) Func - host_execution_get_remains (double) (execution, void*, smx_synchro_t) Func - host_execution_get_state (int, e_smx_state_t) (execution, void*, smx_synchro_t) Proc - host_execution_set_priority (void) (execution, void*, smx_synchro_t) (priority, double) Proc - host_execution_set_bound (void) (execution, void*, smx_synchro_t) (bound, double) -Proc - host_execution_set_affinity (void) (execution, void*, smx_synchro_t) (ws, void*, smx_host_t) (mask, unsigned long) +Proc - host_execution_set_affinity (void) (execution, void*, smx_synchro_t) (ws, void*, sg_host_t) (mask, unsigned long) Blck H host_execution_wait (int) (execution, void*, smx_synchro_t) -Func - host_get_mounted_storage_list (void*, xbt_dict_t) (host, void*, smx_host_t) -Func - host_get_attached_storage_list (void*, xbt_dynar_t) (host, void*, smx_host_t) -Proc - host_get_params (void) (ind_vm, void*, smx_host_t) (params, void*, ws_params_t) -Proc - host_set_params (void) (ind_vm, void*, smx_host_t) (params, void*, ws_params_t) -Func - vm_create (void*, smx_host_t) (name, const char*) (ind_pm, void*, smx_host_t) -Proc - vm_start (void) (ind_vm, void*, smx_host_t) -Func - vm_get_state (int) (ind_vm, void*, smx_host_t) -Proc - vm_migrate (void) (ind_vm, void*, smx_host_t) (ind_dst_pm, void*, smx_host_t) -Func - vm_get_pm (void*) (ind_vm, void*, smx_host_t) -Proc - vm_set_bound (void) (ind_vm, void*, smx_host_t) (bound, double) -Proc - vm_set_affinity (void) (ind_vm, void*, smx_host_t) (ind_pm, void*, smx_host_t) (mask, unsigned long) -Proc - vm_destroy (void) (ind_vm, void*, smx_host_t) -Proc H vm_suspend (void) (ind_vm, void*, smx_host_t) -Proc H vm_resume (void) (ind_vm, void*, smx_host_t) -Proc H vm_shutdown (void) (ind_vm, void*, smx_host_t) -Proc H vm_save (void) (ind_vm, void*, smx_host_t) -Proc H vm_restore (void) (ind_vm, void*, smx_host_t) -Proc - vm_migratefrom_resumeto (void) (vm, void*, smx_host_t)(src_pm, void*, smx_host_t) (dst_pm, void*, smx_host_t) +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*, ws_params_t) +Proc - host_set_params (void) (ind_vm, void*, sg_host_t) (params, void*, ws_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) Proc H process_create (void) (process, void*, smx_process_t*) (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) -Proc H process_change_host (void) (process, void*, smx_process_t) (dest, void*, smx_host_t) +Proc H process_change_host (void) (process, void*, smx_process_t) (dest, void*, sg_host_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) @@ -105,7 +105,7 @@ 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*) -Func - process_get_host (void*, smx_host_t) (process, void*, smx_process_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) @@ -117,7 +117,7 @@ Func H process_restart (void*, smx_process_t) (process, void*, smx_process_t) Func - rdv_create (void*, smx_rdv_t) (name, const char*) Proc - rdv_destroy (void) (rdv, void*, smx_rdv_t) -Func - rdv_comm_count_by_host (unsigned int) (rdv, void*, smx_rdv_t) (host, void*, smx_host_t) +Func - rdv_comm_count_by_host (unsigned int) (rdv, void*, smx_rdv_t) (host, void*, sg_host_t) 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) @@ -155,11 +155,11 @@ 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*, smx_host_t) -Blck H file_write (sg_size_t) (fd, void*, smx_file_t) (size, sg_size_t) (host, void*, smx_host_t) -Blck H file_open (void*, smx_file_t) (fullpath, const char*) (host, void*, smx_host_t) -Blck H file_close (int) (fd, void*, smx_file_t) (host, void*, smx_host_t) -Func - file_unlink (int) (fd, void*, smx_file_t) (host, void*, smx_host_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) +Blck H file_close (int) (fd, void*, smx_file_t) (host, void*, sg_host_t) +Func - file_unlink (int) (fd, void*, smx_file_t) (host, void*, sg_host_t) Func H file_get_size (sg_size_t) (fd, void*, smx_file_t) 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) diff --git a/src/simix/smx_deployment.c b/src/simix/smx_deployment.c index 5602ad6504..f4d472f689 100644 --- a/src/simix/smx_deployment.c +++ b/src/simix/smx_deployment.c @@ -23,7 +23,7 @@ extern int surf_parse_lineno; static void parse_process(sg_platf_process_cbarg_t process) { - smx_host_t host = SIMIX_host_get_by_name(process->host); + sg_host_t host = SIMIX_host_get_by_name(process->host); if (!host) THROWF(arg_error, 0, "Host '%s' unknown", process->host); parse_code = SIMIX_get_registered_function(process->function); @@ -196,7 +196,7 @@ void SIMIX_process_set_function(const char *process_host, { s_sg_platf_process_cbarg_t process = SG_PLATF_PROCESS_INITIALIZER; - smx_host_t host = SIMIX_host_get_by_name(process_host); + sg_host_t host = SIMIX_host_get_by_name(process_host); if (!host) THROWF(arg_error, 0, "Host '%s' unknown", process_host); process.host = sg_host_name(host); diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index c7abb8a0c6..9581afb296 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -630,12 +630,12 @@ void SIMIX_display_process_status(void) break; } XBT_INFO("Process %lu (%s@%s): waiting for %s synchro %p (%s) in state %d to finish", - process->pid, process->name, sg_host_name(process->smx_host), + process->pid, process->name, sg_host_name(process->host), synchro_description, process->waiting_synchro, process->waiting_synchro->name, (int)process->waiting_synchro->state); } else { - XBT_INFO("Process %lu (%s@%s)", process->pid, process->name, sg_host_name(process->smx_host)); + XBT_INFO("Process %lu (%s@%s)", process->pid, process->name, sg_host_name(process->host)); } } } diff --git a/src/simix/smx_host.c b/src/simix/smx_host.c index 628ea0536d..e119d18177 100644 --- a/src/simix/smx_host.c +++ b/src/simix/smx_host.c @@ -21,7 +21,7 @@ static void SIMIX_execution_finish(smx_synchro_t synchro); * \param name name of the host to create * \param data some user data (may be NULL) */ -smx_host_t SIMIX_host_create(const char *name, void *data) +sg_host_t SIMIX_host_create(const char *name, void *data) { smx_host_priv_t smx_host = xbt_new0(s_smx_host_priv_t, 1); s_smx_process_t proc; @@ -40,7 +40,7 @@ smx_host_t SIMIX_host_create(const char *name, void *data) * \brief Start the host if it is off * */ -void SIMIX_host_on(smx_host_t h) +void SIMIX_host_on(sg_host_t h) { smx_host_priv_t host = SIMIX_host_priv(h); @@ -87,7 +87,7 @@ void SIMIX_host_on(smx_host_t h) } } -void simcall_HANDLER_host_off(smx_simcall_t simcall, smx_host_t h) +void simcall_HANDLER_host_off(smx_simcall_t simcall, sg_host_t h) { SIMIX_host_off(h, simcall->issuer); } @@ -96,7 +96,7 @@ void simcall_HANDLER_host_off(smx_simcall_t simcall, smx_host_t h) * \brief Stop the host if it is on * */ -void SIMIX_host_off(smx_host_t h, smx_process_t issuer) +void SIMIX_host_off(sg_host_t h, smx_process_t issuer) { smx_host_priv_t host = SIMIX_host_priv(h); @@ -110,7 +110,7 @@ void SIMIX_host_off(smx_host_t h, smx_process_t issuer) smx_process_t process = NULL; xbt_swag_foreach(process, host->process_list) { SIMIX_process_kill(process, issuer); - XBT_DEBUG("Killing %s on %s by %s", process->name, sg_host_name(process->smx_host), issuer->name); + XBT_DEBUG("Killing %s on %s by %s", process->name, sg_host_name(process->host), issuer->name); } } } @@ -119,7 +119,7 @@ void SIMIX_host_off(smx_host_t h, smx_process_t issuer) /** * \brief Internal function to destroy a SIMIX host. * - * \param h the host to destroy (a smx_host_t) + * \param h the host to destroy (a sg_host_t) */ void SIMIX_host_destroy(void *h) { @@ -150,7 +150,7 @@ void SIMIX_host_destroy(void *h) return; } -smx_host_t SIMIX_host_get_by_name(const char *name){ +sg_host_t SIMIX_host_get_by_name(const char *name){ xbt_assert(((simix_global != NULL) && (host_lib != NULL)), "Environment not set yet"); @@ -158,7 +158,7 @@ smx_host_t SIMIX_host_get_by_name(const char *name){ return xbt_lib_get_elm_or_null(host_lib, name); } -smx_host_t SIMIX_host_self(void) +sg_host_t SIMIX_host_self(void) { smx_process_t process = SIMIX_process_self(); return (process == NULL) ? NULL : SIMIX_process_get_host(process); @@ -168,67 +168,67 @@ smx_host_t SIMIX_host_self(void) by exceptions and logging events */ const char* SIMIX_host_self_get_name(void) { - smx_host_t host = SIMIX_host_self(); + sg_host_t host = SIMIX_host_self(); if (host == NULL || SIMIX_process_self() == simix_global->maestro_process) return ""; return SIMIX_host_get_name(host); } -xbt_dict_t SIMIX_host_get_properties(smx_host_t host){ +xbt_dict_t SIMIX_host_get_properties(sg_host_t host){ return surf_host_get_properties(surf_host_resource_priv(host)); } -double SIMIX_host_get_speed(smx_host_t host){ +double SIMIX_host_get_speed(sg_host_t host){ return surf_host_get_speed(host, 1.0); } -int SIMIX_host_get_core(smx_host_t host){ +int SIMIX_host_get_core(sg_host_t host){ return surf_host_get_core(host); } -xbt_swag_t SIMIX_host_get_process_list(smx_host_t host){ +xbt_swag_t SIMIX_host_get_process_list(sg_host_t host){ smx_host_priv_t host_priv = SIMIX_host_priv(host); return host_priv->process_list; } -double SIMIX_host_get_available_speed(smx_host_t host){ +double SIMIX_host_get_available_speed(sg_host_t host){ return surf_host_get_available_speed(host); } -double SIMIX_host_get_current_power_peak(smx_host_t host) { +double SIMIX_host_get_current_power_peak(sg_host_t host) { return surf_host_get_current_power_peak(host); } -double SIMIX_host_get_power_peak_at(smx_host_t host, int pstate_index) { +double SIMIX_host_get_power_peak_at(sg_host_t host, int pstate_index) { return surf_host_get_power_peak_at(host, pstate_index); } -int SIMIX_host_get_nb_pstates(smx_host_t host) { +int SIMIX_host_get_nb_pstates(sg_host_t host) { return surf_host_get_nb_pstates(host); } -void SIMIX_host_set_pstate(smx_host_t host, int pstate_index) { +void SIMIX_host_set_pstate(sg_host_t host, int pstate_index) { surf_host_set_pstate(host, pstate_index); } -int SIMIX_host_get_pstate(smx_host_t host) { +int SIMIX_host_get_pstate(sg_host_t host) { return surf_host_get_pstate(host); } -double SIMIX_host_get_consumed_energy(smx_host_t host) { +double SIMIX_host_get_consumed_energy(sg_host_t host) { return surf_host_get_consumed_energy(host); } -double SIMIX_host_get_wattmin_at(smx_host_t host,int pstate) { +double SIMIX_host_get_wattmin_at(sg_host_t host,int pstate) { return surf_host_get_wattmin_at(host,pstate); } -double SIMIX_host_get_wattmax_at(smx_host_t host,int pstate) { +double SIMIX_host_get_wattmax_at(sg_host_t host,int pstate) { return surf_host_get_wattmax_at(host,pstate); } -int SIMIX_host_get_state(smx_host_t host){ +int SIMIX_host_get_state(sg_host_t host){ return surf_host_get_state(surf_host_resource_priv(host)); } @@ -249,7 +249,7 @@ void _SIMIX_host_free_process_arg(void *data) * The processes will only be restarted once, meaning that you will have to register the process * again to restart the process again. */ -void SIMIX_host_add_auto_restart_process(smx_host_t host, +void SIMIX_host_add_auto_restart_process(sg_host_t host, const char *name, xbt_main_func_t code, void *data, @@ -291,7 +291,7 @@ void SIMIX_host_add_auto_restart_process(smx_host_t host, /** * \brief Restart the list of processes that have been registered to the host */ -void SIMIX_host_restart_processes(smx_host_t host) +void SIMIX_host_restart_processes(sg_host_t host) { unsigned int cpt; smx_process_arg_t arg; @@ -338,7 +338,7 @@ void SIMIX_host_restart_processes(smx_host_t host) xbt_dynar_reset(process_list); } -void SIMIX_host_autorestart(smx_host_t host) +void SIMIX_host_autorestart(sg_host_t host) { if(simix_global->autorestart) simix_global->autorestart(host); @@ -347,7 +347,7 @@ void SIMIX_host_autorestart(smx_host_t host) } smx_synchro_t SIMIX_host_execute(const char *name, - smx_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask){ + sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask){ /* alloc structures and initialize */ smx_synchro_t synchro = xbt_mallocator_get(simix_global->synchro_mallocator); @@ -385,7 +385,7 @@ smx_synchro_t SIMIX_host_execute(const char *name, } smx_synchro_t SIMIX_host_parallel_execute(const char *name, - int host_nb, smx_host_t *host_list, + int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount, double amount, double rate){ @@ -474,7 +474,7 @@ void SIMIX_host_execution_set_bound(smx_synchro_t synchro, double bound){ surf_cpu_action_set_bound(synchro->execution.surf_exec, bound); } -void SIMIX_host_execution_set_affinity(smx_synchro_t synchro, smx_host_t host, unsigned long mask){ +void SIMIX_host_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask){ xbt_assert(synchro->type == SIMIX_SYNC_EXECUTE); if (synchro->execution.surf_exec) { @@ -531,7 +531,7 @@ void SIMIX_execution_finish(smx_synchro_t synchro) break; case SIMIX_FAILED: - XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", sg_host_name(simcall->issuer->smx_host)); + XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", sg_host_name(simcall->issuer->host)); simcall->issuer->context->iwannadie = 1; SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed"); break; @@ -546,7 +546,7 @@ void SIMIX_execution_finish(smx_synchro_t synchro) (int)synchro->state); } /* check if the host is down */ - if (surf_host_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) { + if (surf_host_get_state(surf_host_resource_priv(simcall->issuer->host)) != SURF_RESOURCE_ON) { simcall->issuer->context->iwannadie = 1; } @@ -601,28 +601,28 @@ void SIMIX_set_category(smx_synchro_t synchro, const char *category) /** * \brief Function to get the parameters of the given the SIMIX host. * - * \param host the host to get_phys_host (a smx_host_t) + * \param host the host to get_phys_host (a sg_host_t) * \param param the parameter object space to be overwritten (a ws_params_t) */ -void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params) +void SIMIX_host_get_params(sg_host_t ind_vm, ws_params_t params) { /* jump to ws_get_params(). */ surf_host_get_params(ind_vm, params); } -void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params) +void SIMIX_host_set_params(sg_host_t ind_vm, ws_params_t params) { /* jump to ws_set_params(). */ surf_host_set_params(ind_vm, params); } -xbt_dict_t SIMIX_host_get_mounted_storage_list(smx_host_t host){ +xbt_dict_t SIMIX_host_get_mounted_storage_list(sg_host_t host){ xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)"); return surf_host_get_mounted_storage_list(host); } -xbt_dynar_t SIMIX_host_get_attached_storage_list(smx_host_t host){ +xbt_dynar_t SIMIX_host_get_attached_storage_list(sg_host_t host){ xbt_assert((host != NULL), "Invalid parameters (simix host is NULL)"); return surf_host_get_attached_storage_list(host); diff --git a/src/simix/smx_host_private.h b/src/simix/smx_host_private.h index d807587676..2895f7b1f5 100644 --- a/src/simix/smx_host_private.h +++ b/src/simix/smx_host_private.h @@ -19,15 +19,15 @@ typedef struct s_smx_host_priv { xbt_dynar_t boot_processes; } s_smx_host_priv_t; -static inline smx_host_priv_t SIMIX_host_priv(smx_host_t host){ +static inline smx_host_priv_t SIMIX_host_priv(sg_host_t host){ return (smx_host_priv_t) xbt_lib_get_level(host, SIMIX_HOST_LEVEL); } void _SIMIX_host_free_process_arg(void *); -smx_host_t SIMIX_host_create(const char *name, void *data); +sg_host_t SIMIX_host_create(const char *name, void *data); void SIMIX_host_destroy(void *host); -void SIMIX_host_add_auto_restart_process(smx_host_t host, +void SIMIX_host_add_auto_restart_process(sg_host_t host, const char *name, xbt_main_func_t code, void *data, @@ -37,28 +37,28 @@ void SIMIX_host_add_auto_restart_process(smx_host_t host, xbt_dict_t properties, int auto_restart); -void SIMIX_host_restart_processes(smx_host_t host); -void SIMIX_host_autorestart(smx_host_t host); -xbt_dict_t SIMIX_host_get_properties(smx_host_t host); -int SIMIX_host_get_core(smx_host_t host); -xbt_swag_t SIMIX_host_get_process_list(smx_host_t host); -double SIMIX_host_get_speed(smx_host_t host); -double SIMIX_host_get_available_speed(smx_host_t host); -int SIMIX_host_get_state(smx_host_t host); -void SIMIX_host_on(smx_host_t host); -void SIMIX_host_off(smx_host_t host, smx_process_t issuer); -double SIMIX_host_get_current_power_peak(smx_host_t host); -double SIMIX_host_get_power_peak_at(smx_host_t host, int pstate_index); -int SIMIX_host_get_nb_pstates(smx_host_t host); -double SIMIX_host_get_consumed_energy(smx_host_t host); -double SIMIX_host_get_wattmin_at(smx_host_t host,int pstate); -double SIMIX_host_get_wattmax_at(smx_host_t host,int pstate); -void SIMIX_host_set_pstate(smx_host_t host, int pstate_index); -int SIMIX_host_get_pstate(smx_host_t host); +void SIMIX_host_restart_processes(sg_host_t host); +void SIMIX_host_autorestart(sg_host_t host); +xbt_dict_t SIMIX_host_get_properties(sg_host_t host); +int SIMIX_host_get_core(sg_host_t host); +xbt_swag_t SIMIX_host_get_process_list(sg_host_t host); +double SIMIX_host_get_speed(sg_host_t host); +double SIMIX_host_get_available_speed(sg_host_t host); +int SIMIX_host_get_state(sg_host_t host); +void SIMIX_host_on(sg_host_t host); +void SIMIX_host_off(sg_host_t host, smx_process_t issuer); +double SIMIX_host_get_current_power_peak(sg_host_t host); +double SIMIX_host_get_power_peak_at(sg_host_t host, int pstate_index); +int SIMIX_host_get_nb_pstates(sg_host_t host); +double SIMIX_host_get_consumed_energy(sg_host_t host); +double SIMIX_host_get_wattmin_at(sg_host_t host,int pstate); +double SIMIX_host_get_wattmax_at(sg_host_t host,int pstate); +void SIMIX_host_set_pstate(sg_host_t host, int pstate_index); +int SIMIX_host_get_pstate(sg_host_t host); smx_synchro_t SIMIX_host_execute(const char *name, - smx_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask); + sg_host_t host, double flops_amount, double priority, double bound, unsigned long affinity_mask); smx_synchro_t SIMIX_host_parallel_execute(const char *name, - int host_nb, smx_host_t *host_list, + int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount, double amount, double rate); void SIMIX_host_execution_destroy(smx_synchro_t synchro); @@ -67,9 +67,9 @@ double SIMIX_host_execution_get_remains(smx_synchro_t synchro); e_smx_state_t SIMIX_host_execution_get_state(smx_synchro_t synchro); void SIMIX_host_execution_set_priority(smx_synchro_t synchro, double priority); void SIMIX_host_execution_set_bound(smx_synchro_t synchro, double bound); -void SIMIX_host_execution_set_affinity(smx_synchro_t synchro, smx_host_t host, unsigned long mask); -xbt_dict_t SIMIX_host_get_mounted_storage_list(smx_host_t host); -xbt_dynar_t SIMIX_host_get_attached_storage_list(smx_host_t host); +void SIMIX_host_execution_set_affinity(smx_synchro_t synchro, sg_host_t host, unsigned long mask); +xbt_dict_t SIMIX_host_get_mounted_storage_list(sg_host_t host); +xbt_dynar_t SIMIX_host_get_attached_storage_list(sg_host_t host); void SIMIX_host_execution_suspend(smx_synchro_t synchro); void SIMIX_host_execution_resume(smx_synchro_t synchro); @@ -78,38 +78,38 @@ void SIMIX_post_host_execute(smx_synchro_t synchro); void SIMIX_set_category(smx_synchro_t synchro, const char *category); /* vm related stuff */ -smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host); +sg_host_t SIMIX_vm_create(const char *name, sg_host_t ind_phys_host); -void SIMIX_vm_destroy(smx_host_t ind_vm); +void SIMIX_vm_destroy(sg_host_t ind_vm); // -- -void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer); +void SIMIX_vm_resume(sg_host_t ind_vm, smx_process_t issuer); -void SIMIX_vm_suspend(smx_host_t ind_vm, smx_process_t issuer); +void SIMIX_vm_suspend(sg_host_t ind_vm, smx_process_t issuer); // -- -void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer); +void SIMIX_vm_save(sg_host_t ind_vm, smx_process_t issuer); -void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer); +void SIMIX_vm_restore(sg_host_t ind_vm, smx_process_t issuer); // -- -void SIMIX_vm_start(smx_host_t ind_vm); +void SIMIX_vm_start(sg_host_t ind_vm); -void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer); +void SIMIX_vm_shutdown(sg_host_t ind_vm, smx_process_t issuer); // -- -int SIMIX_vm_get_state(smx_host_t ind_vm); +int SIMIX_vm_get_state(sg_host_t ind_vm); // -- -void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm); +void SIMIX_vm_migrate(sg_host_t ind_vm, sg_host_t ind_dst_pm); -void *SIMIX_vm_get_pm(smx_host_t ind_vm); +void *SIMIX_vm_get_pm(sg_host_t ind_vm); -void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound); +void SIMIX_vm_set_bound(sg_host_t ind_vm, double bound); -void SIMIX_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask); +void SIMIX_vm_set_affinity(sg_host_t ind_vm, sg_host_t ind_pm, unsigned long mask); -void SIMIX_vm_migratefrom_resumeto(smx_host_t vm, smx_host_t src_pm, smx_host_t dst_pm); +void SIMIX_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm); -void SIMIX_host_get_params(smx_host_t ind_vm, ws_params_t params); +void SIMIX_host_get_params(sg_host_t ind_vm, ws_params_t params); -void SIMIX_host_set_params(smx_host_t ind_vm, ws_params_t params); +void SIMIX_host_set_params(sg_host_t ind_vm, ws_params_t params); SG_END_DECL() diff --git a/src/simix/smx_io.c b/src/simix/smx_io.c index 5800ceb729..e8c3c3fabf 100644 --- a/src/simix/smx_io.c +++ b/src/simix/smx_io.c @@ -50,14 +50,14 @@ void SIMIX_storage_destroy(void *s) } //SIMIX FILE READ -void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host) +void simcall_HANDLER_file_read(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, sg_host_t host) { smx_synchro_t synchro = SIMIX_file_read(fd, size, host); xbt_fifo_push(synchro->simcalls, simcall); simcall->issuer->waiting_synchro = synchro; } -smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) +smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, sg_host_t host) { smx_synchro_t synchro; @@ -82,14 +82,14 @@ smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) } //SIMIX FILE WRITE -void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, smx_host_t host) +void simcall_HANDLER_file_write(smx_simcall_t simcall, smx_file_t fd, sg_size_t size, sg_host_t host) { smx_synchro_t synchro = SIMIX_file_write(fd, size, host); xbt_fifo_push(synchro->simcalls, simcall); simcall->issuer->waiting_synchro = synchro; } -smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) +smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, sg_host_t host) { smx_synchro_t synchro; @@ -114,14 +114,14 @@ smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) } //SIMIX FILE OPEN -void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, smx_host_t host) +void simcall_HANDLER_file_open(smx_simcall_t simcall, const char* fullpath, sg_host_t host) { smx_synchro_t synchro = SIMIX_file_open(fullpath, host); xbt_fifo_push(synchro->simcalls, simcall); simcall->issuer->waiting_synchro = synchro; } -smx_synchro_t SIMIX_file_open(const char* fullpath, smx_host_t host) +smx_synchro_t SIMIX_file_open(const char* fullpath, sg_host_t host) { smx_synchro_t synchro; @@ -146,14 +146,14 @@ smx_synchro_t SIMIX_file_open(const char* fullpath, smx_host_t host) } //SIMIX FILE CLOSE -void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, smx_host_t host) +void simcall_HANDLER_file_close(smx_simcall_t simcall, smx_file_t fd, sg_host_t host) { smx_synchro_t synchro = SIMIX_file_close(fd, host); xbt_fifo_push(synchro->simcalls, simcall); simcall->issuer->waiting_synchro = synchro; } -smx_synchro_t SIMIX_file_close(smx_file_t fd, smx_host_t host) +smx_synchro_t SIMIX_file_close(smx_file_t fd, sg_host_t host) { smx_synchro_t synchro; @@ -179,7 +179,7 @@ smx_synchro_t SIMIX_file_close(smx_file_t fd, smx_host_t host) //SIMIX FILE UNLINK -int SIMIX_file_unlink(smx_file_t fd, smx_host_t host) +int SIMIX_file_unlink(smx_file_t fd, sg_host_t host) { /* check if the host is active */ if (surf_host_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) { @@ -199,7 +199,7 @@ sg_size_t simcall_HANDLER_file_get_size(smx_simcall_t simcall, smx_file_t fd) sg_size_t SIMIX_file_get_size(smx_process_t process, smx_file_t fd) { - smx_host_t host = process->smx_host; + sg_host_t host = process->host; return surf_host_get_size(host, fd->surf_file); } @@ -210,7 +210,7 @@ sg_size_t simcall_HANDLER_file_tell(smx_simcall_t simcall, smx_file_t fd) sg_size_t SIMIX_file_tell(smx_process_t process, smx_file_t fd) { - smx_host_t host = process->smx_host; + sg_host_t host = process->host; return surf_host_file_tell(host, fd->surf_file); } @@ -222,7 +222,7 @@ xbt_dynar_t simcall_HANDLER_file_get_info(smx_simcall_t simcall, smx_file_t fd) xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd) { - smx_host_t host = process->smx_host; + sg_host_t host = process->host; return surf_host_get_info(host, fd->surf_file); } @@ -233,7 +233,7 @@ int simcall_HANDLER_file_seek(smx_simcall_t simcall, smx_file_t fd, sg_offset_t int SIMIX_file_seek(smx_process_t process, smx_file_t fd, sg_offset_t offset, int origin) { - smx_host_t host = process->smx_host; + sg_host_t host = process->host; return surf_host_file_seek(host, fd->surf_file, offset, origin); } @@ -244,7 +244,7 @@ int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t file, const char int SIMIX_file_move(smx_process_t process, smx_file_t file, const char* fullpath) { - smx_host_t host = process->smx_host; + sg_host_t host = process->host; return surf_host_file_move(host, file->surf_file, fullpath); } @@ -375,7 +375,7 @@ void SIMIX_io_finish(smx_synchro_t synchro) (int)synchro->state); } - if (surf_host_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) { + if (surf_host_get_state(surf_host_resource_priv(simcall->issuer->host)) != SURF_RESOURCE_ON) { simcall->issuer->context->iwannadie = 1; } diff --git a/src/simix/smx_io_private.h b/src/simix/smx_io_private.h index 1cc843d10c..81fa6c6adf 100644 --- a/src/simix/smx_io_private.h +++ b/src/simix/smx_io_private.h @@ -22,11 +22,11 @@ static inline smx_storage_priv_t SIMIX_storage_priv(smx_storage_t storage){ smx_storage_t SIMIX_storage_create(const char *name, void *storage, void *data); void SIMIX_storage_destroy(void *s); -smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, smx_host_t host); -smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, smx_host_t host); -smx_synchro_t SIMIX_file_open(const char* fullpath, smx_host_t host); -smx_synchro_t SIMIX_file_close(smx_file_t fd, smx_host_t host); -int SIMIX_file_unlink(smx_file_t fd, smx_host_t host); +smx_synchro_t SIMIX_file_read(smx_file_t fd, sg_size_t size, sg_host_t host); +smx_synchro_t SIMIX_file_write(smx_file_t fd, sg_size_t size, sg_host_t host); +smx_synchro_t SIMIX_file_open(const char* fullpath, sg_host_t host); +smx_synchro_t SIMIX_file_close(smx_file_t fd, sg_host_t host); +int SIMIX_file_unlink(smx_file_t fd, sg_host_t host); sg_size_t SIMIX_file_get_size(smx_process_t process, smx_file_t fd); sg_size_t SIMIX_file_tell(smx_process_t process, smx_file_t fd); xbt_dynar_t SIMIX_file_get_info(smx_process_t process, smx_file_t fd); diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index a671d9f2d9..d0dcb2d242 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -91,14 +91,14 @@ smx_rdv_t SIMIX_rdv_get_by_name(const char *name) return xbt_dict_get_or_null(rdv_points, name); } -int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) +int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host) { smx_synchro_t comm = NULL; xbt_fifo_item_t item = NULL; int count = 0; xbt_fifo_foreach(rdv->comm_fifo, item, comm, smx_synchro_t) { - if (comm->comm.src_proc->smx_host == host) + if (comm->comm.src_proc->host == host) count++; } @@ -616,7 +616,7 @@ void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_synchro_t synchro, dou if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) { SIMIX_comm_finish(synchro); } else { /* if (timeout >= 0) { we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host fails */ - sleep = surf_host_sleep(simcall->issuer->smx_host, timeout); + sleep = surf_host_sleep(simcall->issuer->host, timeout); surf_action_set_data(sleep, synchro); if (simcall->issuer == synchro->comm.src_proc) @@ -727,8 +727,8 @@ static XBT_INLINE void SIMIX_comm_start(smx_synchro_t synchro) /* If both the sender and the receiver are already there, start the communication */ if (synchro->state == SIMIX_READY) { - smx_host_t sender = synchro->comm.src_proc->smx_host; - smx_host_t receiver = synchro->comm.dst_proc->smx_host; + sg_host_t sender = synchro->comm.src_proc->host; + sg_host_t receiver = synchro->comm.dst_proc->host; XBT_DEBUG("Starting communication %p from '%s' to '%s'", synchro, SIMIX_host_get_name(sender), SIMIX_host_get_name(receiver)); @@ -757,10 +757,10 @@ static XBT_INLINE void SIMIX_comm_start(smx_synchro_t synchro) if (SIMIX_process_is_suspended(synchro->comm.src_proc)) XBT_DEBUG("The communication is suspended on startup because src (%s:%s) were suspended since it initiated the communication", - SIMIX_host_get_name(synchro->comm.src_proc->smx_host), synchro->comm.src_proc->name); + SIMIX_host_get_name(synchro->comm.src_proc->host), synchro->comm.src_proc->name); else XBT_DEBUG("The communication is suspended on startup because dst (%s:%s) were suspended since it initiated the communication", - SIMIX_host_get_name(synchro->comm.dst_proc->smx_host), synchro->comm.dst_proc->name); + SIMIX_host_get_name(synchro->comm.dst_proc->host), synchro->comm.dst_proc->name); surf_action_suspend(synchro->comm.surf_comm); @@ -801,7 +801,7 @@ void SIMIX_comm_finish(smx_synchro_t synchro) /* Check out for errors */ if (surf_host_get_state(surf_host_resource_priv( - simcall->issuer->smx_host)) != SURF_RESOURCE_ON) { + simcall->issuer->host)) != SURF_RESOURCE_ON) { simcall->issuer->context->iwannadie = 1; SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed"); } else @@ -843,8 +843,8 @@ void SIMIX_comm_finish(smx_synchro_t synchro) XBT_DEBUG("Link failure in synchro %p between '%s' and '%s': posting an exception to the issuer: %s (%p) detached:%d", synchro, - synchro->comm.src_proc ? sg_host_name(synchro->comm.src_proc->smx_host) : NULL, - synchro->comm.dst_proc ? sg_host_name(synchro->comm.dst_proc->smx_host) : NULL, + synchro->comm.src_proc ? sg_host_name(synchro->comm.src_proc->host) : NULL, + synchro->comm.dst_proc ? sg_host_name(synchro->comm.dst_proc->host) : NULL, simcall->issuer->name, simcall->issuer, synchro->comm.detached); if (synchro->comm.src_proc == simcall->issuer) { XBT_DEBUG("I'm source"); @@ -879,7 +879,7 @@ void SIMIX_comm_finish(smx_synchro_t synchro) } } - if (surf_host_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) { + if (surf_host_get_state(surf_host_resource_priv(simcall->issuer->host)) != SURF_RESOURCE_ON) { simcall->issuer->context->iwannadie = 1; } @@ -1103,9 +1103,9 @@ void SIMIX_comm_copy_data(smx_synchro_t comm) XBT_DEBUG("Copying comm %p data from %s (%p) -> %s (%p) (%zu bytes)", comm, - comm->comm.src_proc ? sg_host_name(comm->comm.src_proc->smx_host) : "a finished process", + comm->comm.src_proc ? sg_host_name(comm->comm.src_proc->host) : "a finished process", comm->comm.src_buff, - comm->comm.dst_proc ? sg_host_name(comm->comm.dst_proc->smx_host) : "a finished process", + comm->comm.dst_proc ? sg_host_name(comm->comm.dst_proc->host) : "a finished process", comm->comm.dst_buff, buff_size); /* Copy at most dst_buff_size bytes of the message to receiver's buffer */ diff --git a/src/simix/smx_network_private.h b/src/simix/smx_network_private.h index 6ea862d3d3..6ea4fd992c 100644 --- a/src/simix/smx_network_private.h +++ b/src/simix/smx_network_private.h @@ -30,7 +30,7 @@ smx_rdv_t SIMIX_rdv_create(const char *name); void SIMIX_rdv_destroy(smx_rdv_t rdv); smx_rdv_t SIMIX_rdv_get_by_name(const char *name); void SIMIX_rdv_remove(smx_rdv_t rdv, smx_synchro_t comm); -int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host); +int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, sg_host_t host); smx_synchro_t SIMIX_rdv_get_head(smx_rdv_t rdv); void SIMIX_rdv_set_receiver(smx_rdv_t rdv, smx_process_t proc); smx_process_t SIMIX_rdv_get_receiver(smx_rdv_t rdv); diff --git a/src/simix/smx_private.h b/src/simix/smx_private.h index afc5e64af3..593cf07f9e 100644 --- a/src/simix/smx_private.h +++ b/src/simix/smx_private.h @@ -50,7 +50,7 @@ typedef struct s_smx_global { /** Callback used when killing a SMX_process */ void_pfn_smxprocess_t cleanup_process_function; xbt_mallocator_t synchro_mallocator; - void_pfn_smxhost_t autorestart; + void_pfn_sghost_t autorestart; #ifdef TIME_BENCH_AMDAHL xbt_os_timer_t timer_seq; /* used to bench the sequential and parallel parts of the simulation, if requested to */ @@ -131,7 +131,7 @@ typedef struct s_smx_synchro { union { struct { - smx_host_t host; /* The host where the execution takes place */ + sg_host_t host; /* The host where the execution takes place */ surf_action_t surf_exec; /* The Surf execution action encapsulated */ } execution; /* Possibly parallel execution */ @@ -174,7 +174,7 @@ typedef struct s_smx_synchro { } comm; struct { - smx_host_t host; /* The host that is sleeping */ + sg_host_t host; /* The host that is sleeping */ surf_action_t surf_sleep; /* The Surf sleeping action encapsulated */ } sleep; @@ -183,7 +183,7 @@ typedef struct s_smx_synchro { } synchro; struct { - smx_host_t host; + sg_host_t host; surf_action_t surf_io; } io; }; diff --git a/src/simix/smx_process.c b/src/simix/smx_process.c index f91a7a2a91..fe3a213d06 100644 --- a/src/simix/smx_process.c +++ b/src/simix/smx_process.c @@ -96,7 +96,7 @@ void SIMIX_process_cleanup(smx_process_t process) XBT_DEBUG("%p should not be run anymore",process); xbt_swag_remove(process, simix_global->process_list); - xbt_swag_remove(process, SIMIX_host_priv(process->smx_host)->process_list); + xbt_swag_remove(process, SIMIX_host_priv(process->host)->process_list); xbt_swag_insert(process, simix_global->process_to_destroy); process->context->iwannadie = 0; @@ -163,14 +163,14 @@ void SIMIX_process_stop(smx_process_t arg) { /* Add the process to the list of process to restart, only if * the host is down */ - if (arg->auto_restart && !SIMIX_host_get_state(arg->smx_host)) { - SIMIX_host_add_auto_restart_process(arg->smx_host,arg->name,arg->code, arg->data, - sg_host_name(arg->smx_host), + if (arg->auto_restart && !SIMIX_host_get_state(arg->host)) { + SIMIX_host_add_auto_restart_process(arg->host,arg->name,arg->code, arg->data, + sg_host_name(arg->host), SIMIX_timer_get_date(arg->kill_timer), arg->argc,arg->argv,arg->properties, arg->auto_restart); } - XBT_DEBUG("Process %s (%s) is dead",arg->name,sg_host_name(arg->smx_host)); + XBT_DEBUG("Process %s (%s) is dead",arg->name,sg_host_name(arg->host)); /* stop the context */ SIMIX_context_stop(arg->context); } @@ -234,7 +234,7 @@ void SIMIX_process_create(smx_process_t *process, smx_process_t parent_process) { *process = NULL; - smx_host_t host = SIMIX_host_get_by_name(hostname); + sg_host_t host = SIMIX_host_get_by_name(hostname); XBT_DEBUG("Start process %s on host '%s'", name, hostname); @@ -253,7 +253,7 @@ void SIMIX_process_create(smx_process_t *process, /* Process data */ (*process)->pid = simix_process_maxpid++; (*process)->name = xbt_strdup(name); - (*process)->smx_host = host; + (*process)->host = host; (*process)->data = data; (*process)->comms = xbt_fifo_new(); (*process)->simcall.issuer = *process; @@ -297,7 +297,7 @@ void SIMIX_process_create(smx_process_t *process, if (kill_time > SIMIX_get_clock() && simix_global->kill_process_function) { XBT_DEBUG("Process %s(%s) will be kill at time %f", (*process)->name, - sg_host_name((*process)->smx_host), kill_time); + sg_host_name((*process)->host), kill_time); (*process)->kill_timer = SIMIX_timer_set(kill_time, simix_global->kill_process_function, *process); } } @@ -336,7 +336,7 @@ void simcall_HANDLER_process_kill(smx_simcall_t simcall, smx_process_t process) */ void SIMIX_process_kill(smx_process_t process, smx_process_t issuer) { - XBT_DEBUG("Killing process %s on %s", process->name, sg_host_name(process->smx_host)); + XBT_DEBUG("Killing process %s on %s", process->name, sg_host_name(process->host)); process->context->iwannadie = 1; process->blocked = 0; @@ -464,16 +464,16 @@ void SIMIX_process_killall(smx_process_t issuer, int reset_pid) } void simcall_HANDLER_process_change_host(smx_simcall_t simcall, smx_process_t process, - smx_host_t dest) + sg_host_t dest) { process->new_host = dest; } void SIMIX_process_change_host(smx_process_t process, - smx_host_t dest) + sg_host_t dest) { xbt_assert((process != NULL), "Invalid parameters"); - xbt_swag_remove(process, SIMIX_host_priv(process->smx_host)->process_list); - process->smx_host = dest; + xbt_swag_remove(process, SIMIX_host_priv(process->host)->process_list); + process->host = dest; xbt_swag_insert(process, SIMIX_host_priv(dest)->process_list); } @@ -540,7 +540,7 @@ smx_synchro_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer) } } else { /* FIXME: computation size is zero. Is it okay that bound is zero ? */ - return SIMIX_host_execute("suspend", process->smx_host, 0.0, 1.0, 0.0, 0); + return SIMIX_host_execute("suspend", process->host, 0.0, 1.0, 0.0, 0); } } @@ -646,9 +646,9 @@ void SIMIX_process_set_data(smx_process_t process, void *data) process->data = data; } -smx_host_t SIMIX_process_get_host(smx_process_t process) +sg_host_t SIMIX_process_get_host(smx_process_t process) { - return process->smx_host; + return process->host; } /* needs to be public and without simcall because it is called @@ -743,7 +743,7 @@ void simcall_HANDLER_process_sleep(smx_simcall_t simcall, double duration) smx_synchro_t SIMIX_process_sleep(smx_process_t process, double duration) { smx_synchro_t synchro; - smx_host_t host = process->smx_host; + sg_host_t host = process->host; /* check if the host is active */ if (surf_host_get_state(surf_host_resource_priv(host)) != SURF_RESOURCE_ON) { @@ -788,7 +788,7 @@ void SIMIX_post_process_sleep(smx_synchro_t synchro) THROW_IMPOSSIBLE; break; } - if (surf_host_get_state(surf_host_resource_priv(simcall->issuer->smx_host)) != SURF_RESOURCE_ON) { + if (surf_host_get_state(surf_host_resource_priv(simcall->issuer->host)) != SURF_RESOURCE_ON) { simcall->issuer->context->iwannadie = 1; } simcall_process_sleep__set__result(simcall, state); @@ -964,12 +964,12 @@ smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process } /** @brief Restart a process, starting it again from the beginning. */ smx_process_t SIMIX_process_restart(smx_process_t process, smx_process_t issuer) { - XBT_DEBUG("Restarting process %s on %s", process->name, sg_host_name(process->smx_host)); + XBT_DEBUG("Restarting process %s on %s", process->name, sg_host_name(process->host)); //retrieve the arguments of the old process //FIXME: Factorize this with SIMIX_host_add_auto_restart_process ? s_smx_process_arg_t arg; arg.code = process->code; - arg.hostname = sg_host_name(process->smx_host); + arg.hostname = sg_host_name(process->host); arg.kill_time = SIMIX_timer_get_date(process->kill_timer); arg.argc = process->argc; arg.data = process->data; diff --git a/src/simix/smx_process_private.h b/src/simix/smx_process_private.h index af4d470011..64dcc64a9a 100644 --- a/src/simix/smx_process_private.h +++ b/src/simix/smx_process_private.h @@ -39,7 +39,7 @@ typedef struct s_smx_process { unsigned long pid; unsigned long ppid; char *name; /**< @brief process name if any */ - smx_host_t smx_host; /* the host on which the process is running */ + sg_host_t host; /* the host on which the process is running */ smx_context_t context; /* the context (uctx/raw/thread) that executes the user function */ xbt_running_ctx_t *running_ctx; unsigned doexception:1; @@ -47,7 +47,7 @@ typedef struct s_smx_process { unsigned suspended:1; unsigned auto_restart:1; - smx_host_t new_host; /* if not null, the host on which the process must migrate to */ + sg_host_t new_host; /* if not null, the host on which the process must migrate to */ smx_synchro_t waiting_synchro; /* the current blocking synchro if any */ xbt_fifo_t comms; /* the current non-blocking communication synchros */ xbt_dict_t properties; @@ -84,14 +84,14 @@ void SIMIX_process_yield(smx_process_t self); xbt_running_ctx_t *SIMIX_process_get_running_context(void); void SIMIX_process_exception_terminate(xbt_ex_t * e); void SIMIX_process_change_host(smx_process_t process, - smx_host_t dest); + sg_host_t dest); smx_synchro_t SIMIX_process_suspend(smx_process_t process, smx_process_t issuer); void SIMIX_process_resume(smx_process_t process, smx_process_t issuer); int SIMIX_process_get_PID(smx_process_t self); int SIMIX_process_get_PPID(smx_process_t self); void* SIMIX_process_get_data(smx_process_t process); void SIMIX_process_set_data(smx_process_t process, void *data); -smx_host_t SIMIX_process_get_host(smx_process_t process); +sg_host_t SIMIX_process_get_host(smx_process_t process); const char* SIMIX_process_get_name(smx_process_t process); smx_process_t SIMIX_process_get_by_name(const char* name); int SIMIX_process_is_suspended(smx_process_t process); diff --git a/src/simix/smx_synchro.c b/src/simix/smx_synchro.c index 8b05de185b..a9d9219b0b 100644 --- a/src/simix/smx_synchro.c +++ b/src/simix/smx_synchro.c @@ -11,7 +11,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_synchro, simix, "SIMIX Synchronization (mutex, semaphores and conditions)"); -static smx_synchro_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout); +static smx_synchro_t SIMIX_synchro_wait(sg_host_t smx_host, double timeout); static void SIMIX_synchro_finish(smx_synchro_t synchro); static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout, smx_process_t issuer, smx_simcall_t simcall); @@ -20,7 +20,7 @@ static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer, /***************************** Raw synchronization *********************************/ -static smx_synchro_t SIMIX_synchro_wait(smx_host_t smx_host, double timeout) +static smx_synchro_t SIMIX_synchro_wait(sg_host_t smx_host, double timeout) { XBT_IN("(%p, %f)",smx_host,timeout); @@ -154,7 +154,7 @@ void simcall_HANDLER_mutex_lock(smx_simcall_t simcall, smx_mutex_t mutex) if (mutex->locked) { /* FIXME: check if the host is active ? */ /* Somebody using the mutex, use a synchronization to get host failures */ - synchro = SIMIX_synchro_wait(process->smx_host, -1); + synchro = SIMIX_synchro_wait(process->host, -1); xbt_fifo_push(synchro->simcalls, simcall); simcall->issuer->waiting_synchro = synchro; xbt_swag_insert(simcall->issuer, mutex->sleeping); @@ -309,7 +309,7 @@ static void _SIMIX_cond_wait(smx_cond_t cond, smx_mutex_t mutex, double timeout, SIMIX_mutex_unlock(mutex, issuer); } - synchro = SIMIX_synchro_wait(issuer->smx_host, timeout); + synchro = SIMIX_synchro_wait(issuer->host, timeout); xbt_fifo_unshift(synchro->simcalls, simcall); issuer->waiting_synchro = synchro; xbt_swag_insert(simcall->issuer, cond->sleeping); @@ -473,7 +473,7 @@ static void _SIMIX_sem_wait(smx_sem_t sem, double timeout, smx_process_t issuer, XBT_DEBUG("Wait semaphore %p (timeout:%f)", sem, timeout); if (sem->value <= 0) { - synchro = SIMIX_synchro_wait(issuer->smx_host, timeout); + synchro = SIMIX_synchro_wait(issuer->host, timeout); xbt_fifo_unshift(synchro->simcalls, simcall); issuer->waiting_synchro = synchro; xbt_swag_insert(issuer, sem->sleeping); diff --git a/src/simix/smx_vm.c b/src/simix/smx_vm.c index 0ee280f6e3..3d9f156a99 100644 --- a/src/simix/smx_vm.c +++ b/src/simix/smx_vm.c @@ -20,12 +20,12 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_vm, simix, "Logging specific to SIMIX (vms * \param name name of the host to create * \param data some user data (may be NULL) */ -smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host) +sg_host_t SIMIX_vm_create(const char *name, sg_host_t ind_phys_host) { /* Create surf associated resource */ surf_vm_model_create(name, ind_phys_host); - smx_host_t smx_host = SIMIX_host_create(name, NULL); + sg_host_t smx_host = SIMIX_host_create(name, NULL); /* We will be able to register the VM to its physical host, so that we can promptly * retrieve the list VMs on the physical host. */ @@ -35,7 +35,7 @@ smx_host_t SIMIX_vm_create(const char *name, smx_host_t ind_phys_host) /* works for VMs and PMs */ -static long host_get_ramsize(smx_host_t vm, int *overcommit) +static long host_get_ramsize(sg_host_t vm, int *overcommit) { s_ws_params_t params; surf_host_get_params(vm, ¶ms); @@ -47,9 +47,9 @@ static long host_get_ramsize(smx_host_t vm, int *overcommit) } /* **** start a VM **** */ -static int __can_be_started(smx_host_t vm) +static int __can_be_started(sg_host_t vm) { - smx_host_t pm = surf_vm_get_pm(vm); + sg_host_t pm = surf_vm_get_pm(vm); int pm_overcommit = 0; long pm_ramsize = host_get_ramsize(pm, &pm_overcommit); @@ -69,7 +69,7 @@ static int __can_be_started(smx_host_t vm) xbt_dynar_t dyn_vms = surf_host_get_vms(pm); { unsigned int cursor = 0; - smx_host_t another_vm; + sg_host_t another_vm; xbt_dynar_foreach(dyn_vms, cursor, another_vm) { long another_vm_ramsize = host_get_ramsize(vm, NULL); total_ramsize_of_vms += another_vm_ramsize; @@ -87,7 +87,7 @@ static int __can_be_started(smx_host_t vm) return 1; } -void SIMIX_vm_start(smx_host_t ind_vm) +void SIMIX_vm_start(sg_host_t ind_vm) { if (__can_be_started(ind_vm)) surf_host_set_state(surf_host_resource_priv(ind_vm), @@ -97,7 +97,7 @@ void SIMIX_vm_start(smx_host_t ind_vm) } -int SIMIX_vm_get_state(smx_host_t ind_vm) +int SIMIX_vm_get_state(sg_host_t ind_vm) { return surf_host_get_state(surf_host_resource_priv(ind_vm)); } @@ -105,9 +105,9 @@ int SIMIX_vm_get_state(smx_host_t ind_vm) /** * \brief Function to migrate a SIMIX VM host. * - * \param host the vm host to migrate (a smx_host_t) + * \param host the vm host to migrate (a sg_host_t) */ -void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) +void SIMIX_vm_migrate(sg_host_t ind_vm, sg_host_t ind_dst_pm) { /* precopy migration makes the VM temporally paused */ xbt_assert(SIMIX_vm_get_state(ind_vm) == SURF_VM_STATE_SUSPENDED); @@ -129,7 +129,7 @@ void SIMIX_vm_migrate(smx_host_t ind_vm, smx_host_t ind_dst_pm) * \param src_pm Source physical host * \param dst_pmt Destination physical host */ -void SIMIX_vm_migratefrom_resumeto(smx_host_t vm, smx_host_t src_pm, smx_host_t dst_pm) +void SIMIX_vm_migratefrom_resumeto(sg_host_t vm, sg_host_t src_pm, sg_host_t dst_pm) { /* deinstall the current affinity setting for the CPU */ SIMIX_vm_set_affinity(vm, src_pm, 0); @@ -145,9 +145,9 @@ void SIMIX_vm_migratefrom_resumeto(smx_host_t vm, smx_host_t src_pm, smx_host_t /** * \brief Function to get the physical host of the given SIMIX VM host. * - * \param host the vm host to get_phys_host (a smx_host_t) + * \param host the vm host to get_phys_host (a sg_host_t) */ -void *SIMIX_vm_get_pm(smx_host_t ind_vm) +void *SIMIX_vm_get_pm(sg_host_t ind_vm) { /* jump to vm_ws_get_pm(). this will return the vm name. */ return surf_vm_get_pm(ind_vm); @@ -156,10 +156,10 @@ void *SIMIX_vm_get_pm(smx_host_t ind_vm) /** * \brief Function to set the CPU bound of the given SIMIX VM host. * - * \param host the vm host (a smx_host_t) + * \param host the vm host (a sg_host_t) * \param bound bound (a double) */ -void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound) +void SIMIX_vm_set_bound(sg_host_t ind_vm, double bound) { /* jump to vm_ws_set_vm_bound(). */ surf_vm_set_bound(ind_vm, bound); @@ -168,11 +168,11 @@ void SIMIX_vm_set_bound(smx_host_t ind_vm, double bound) /** * \brief Function to set the CPU affinity of the given SIMIX VM host. * - * \param host the vm host (a smx_host_t) - * \param host the pm host (a smx_host_t) + * \param host the vm host (a sg_host_t) + * \param host the pm host (a sg_host_t) * \param mask affinity mask (a unsigned long) */ -void SIMIX_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long mask) +void SIMIX_vm_set_affinity(sg_host_t ind_vm, sg_host_t ind_pm, unsigned long mask) { /* make sure this at the MSG layer. */ xbt_assert(SIMIX_vm_get_pm(ind_vm) == ind_pm); @@ -187,9 +187,9 @@ void SIMIX_vm_set_affinity(smx_host_t ind_vm, smx_host_t ind_pm, unsigned long m * VM. All the processes on this VM will pause. The state of the VM is * preserved on memory. We can later resume it again. * - * \param host the vm host to suspend (a smx_host_t) + * \param host the vm host to suspend (a sg_host_t) */ -void SIMIX_vm_suspend(smx_host_t ind_vm, smx_process_t issuer) +void SIMIX_vm_suspend(sg_host_t ind_vm, smx_process_t issuer) { const char *name = SIMIX_host_get_name(ind_vm); @@ -210,9 +210,9 @@ void SIMIX_vm_suspend(smx_host_t ind_vm, smx_process_t issuer) XBT_DEBUG("suspend all processes on the VM done done"); } -void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, sg_host_t ind_vm) { - if (simcall->issuer->smx_host == ind_vm) { + if (simcall->issuer->host == ind_vm) { XBT_ERROR("cannot suspend the VM where I run"); DIE_IMPOSSIBLE; } @@ -227,9 +227,9 @@ void simcall_HANDLER_vm_suspend(smx_simcall_t simcall, smx_host_t ind_vm) * \brief Function to resume a SIMIX VM host. This function restart the execution of the * VM. All the processes on this VM will run again. * - * \param host the vm host to resume (a smx_host_t) + * \param host the vm host to resume (a sg_host_t) */ -void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer) +void SIMIX_vm_resume(sg_host_t ind_vm, smx_process_t issuer) { const char *name = SIMIX_host_get_name(ind_vm); @@ -248,7 +248,7 @@ void SIMIX_vm_resume(smx_host_t ind_vm, smx_process_t issuer) } } -void simcall_HANDLER_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_resume(smx_simcall_t simcall, sg_host_t ind_vm) { SIMIX_vm_resume(ind_vm, simcall->issuer); } @@ -259,9 +259,9 @@ void simcall_HANDLER_vm_resume(smx_simcall_t simcall, smx_host_t ind_vm) * This function is the same as vm_suspend, but the state of the VM is saved to the disk, and not preserved on memory. * We can later restore it again. * - * \param host the vm host to save (a smx_host_t) + * \param host the vm host to save (a sg_host_t) */ -void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer) +void SIMIX_vm_save(sg_host_t ind_vm, smx_process_t issuer) { const char *name = SIMIX_host_get_name(ind_vm); @@ -281,7 +281,7 @@ void SIMIX_vm_save(smx_host_t ind_vm, smx_process_t issuer) } } -void simcall_HANDLER_vm_save(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_save(smx_simcall_t simcall, sg_host_t ind_vm) { SIMIX_vm_save(ind_vm, simcall->issuer); } @@ -291,9 +291,9 @@ void simcall_HANDLER_vm_save(smx_simcall_t simcall, smx_host_t ind_vm) * \brief Function to restore a SIMIX VM host. This function restart the execution of the * VM. All the processes on this VM will run again. * - * \param host the vm host to restore (a smx_host_t) + * \param host the vm host to restore (a sg_host_t) */ -void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer) +void SIMIX_vm_restore(sg_host_t ind_vm, smx_process_t issuer) { const char *name = SIMIX_host_get_name(ind_vm); @@ -312,7 +312,7 @@ void SIMIX_vm_restore(smx_host_t ind_vm, smx_process_t issuer) } } -void simcall_HANDLER_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_restore(smx_simcall_t simcall, sg_host_t ind_vm) { SIMIX_vm_restore(ind_vm, simcall->issuer); } @@ -323,9 +323,9 @@ void simcall_HANDLER_vm_restore(smx_simcall_t simcall, smx_host_t ind_vm) * VM. All the processes on this VM will be killed. But, the state of the VM is * preserved on memory. We can later start it again. * - * \param host the vm host to shutdown (a smx_host_t) + * \param host the vm host to shutdown (a sg_host_t) */ -void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer) +void SIMIX_vm_shutdown(sg_host_t ind_vm, smx_process_t issuer) { const char *name = SIMIX_host_get_name(ind_vm); @@ -346,7 +346,7 @@ void SIMIX_vm_shutdown(smx_host_t ind_vm, smx_process_t issuer) (int)SURF_VM_STATE_CREATED); } -void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm) +void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, sg_host_t ind_vm) { SIMIX_vm_shutdown(ind_vm, simcall->issuer); } @@ -355,9 +355,9 @@ void simcall_HANDLER_vm_shutdown(smx_simcall_t simcall, smx_host_t ind_vm) /** * \brief Function to destroy a SIMIX VM host. * - * \param host the vm host to destroy (a smx_host_t) + * \param host the vm host to destroy (a sg_host_t) */ -void SIMIX_vm_destroy(smx_host_t ind_vm) +void SIMIX_vm_destroy(sg_host_t ind_vm) { /* this code basically performs a similar thing like SIMIX_host_destroy() */ diff --git a/src/smpi/smpi_bench.c b/src/smpi/smpi_bench.c index a67e6366f2..9dfcdb367e 100644 --- a/src/smpi/smpi_bench.c +++ b/src/smpi/smpi_bench.c @@ -153,7 +153,7 @@ void smpi_execute_(double *duration) void smpi_execute_flops(double flops) { smx_synchro_t action; - smx_host_t host; + sg_host_t host; host = SIMIX_host_self(); XBT_DEBUG("Handle real computation time: %f flops", flops); action = simcall_host_execute("computation", host, flops, 1, 0, 0); diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index cdfef8ccb7..177ca14bf7 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -430,11 +430,11 @@ int surf_host_file_move(surf_resource_t host, surf_file_t fd, const char* fullpa xbt_dynar_t surf_host_get_vms(surf_resource_t host){ xbt_dynar_t vms = get_casted_host(host)->getVms(); - xbt_dynar_t vms_ = xbt_dynar_new(sizeof(smx_host_t), NULL); + xbt_dynar_t vms_ = xbt_dynar_new(sizeof(sg_host_t), NULL); unsigned int cpt; VMPtr vm; xbt_dynar_foreach(vms, cpt, vm) { - smx_host_t vm_ = xbt_lib_get_elm_or_null(host_lib, vm->getName()); + sg_host_t vm_ = xbt_lib_get_elm_or_null(host_lib, vm->getName()); xbt_dynar_push(vms_, &vm_); } xbt_dynar_free(&vms);