This is one step further toward SGpp, the C++ version of SimGrid.
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
#define SG_PLATF_H
#include <xbt.h>
+#include <simgrid/host.h>
SG_BEGIN_DECL()
double scale,
double shape);
-typedef xbt_dictelm_t sg_host_t;
static inline char* sg_host_name(sg_host_t host) {
return host->key;
}
#include "xbt/swag.h"
#include "simgrid/platf.h"
#include "simgrid/datatypes.h"
+#include "simgrid/host.h"
SG_BEGIN_DECL()
\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,
* 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
*/
/* 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 */
/*********************************** 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);
/******************************************************************************/
/******************************* 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,
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 */
/* 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);
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);
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);
/***************************** 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);
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]);
}
}
*/
/********************************* 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);
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;
# 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);
/* 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;
* \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);
}
* \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);
}
*
* \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);
}
*
* \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);
}
* \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);
}
* \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);
}
* \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);
}
* \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);
}
*
* \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);
}
* \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);
}
* \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);
}
* \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);
}
* \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);
}
* \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);
}
*
* \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);
}
* \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);
}
* \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)
{
*/
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,
* \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);
}
*
* \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);
}
*
* \param vm VM
*/
-void simcall_vm_start(smx_host_t vm)
+void simcall_vm_start(sg_host_t vm)
{
simcall_BODY_vm_start(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);
}
* \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);
}
* \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);
}
*
* \param vm VM
*/
-void simcall_vm_suspend(smx_host_t vm)
+void simcall_vm_suspend(sg_host_t vm)
{
simcall_BODY_vm_suspend(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);
}
*
* \param vm VM
*/
-void simcall_vm_save(smx_host_t vm)
+void simcall_vm_save(sg_host_t vm)
{
simcall_BODY_vm_save(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);
}
*
* \param vm VM
*/
-void simcall_vm_shutdown(smx_host_t vm)
+void simcall_vm_shutdown(sg_host_t vm)
{
simcall_BODY_vm_shutdown(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);
}
* \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);
}
* \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);
}
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);
}
}
* \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);
}
* \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);
}
* \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);
}
* \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);
}
* \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);
}
* \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);
}
* \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);
}
* \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);
}
* \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);
}
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
/* 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);
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);
#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 */
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 */
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 */
}
-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 */
}
-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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
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 */
}
-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 */
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 */
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 */
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 */
}
-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 */
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 */
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 */
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 */
}
-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 */
}
-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 */
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 */
}
-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 */
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 */
}
-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 */
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 */
}
-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 */
}
-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 */
}
-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 */
}
-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 */
}
-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 */
}
-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 */
}
-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 */
}
-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 */
}
-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 */
}
-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 */
}
-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 */
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 */
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 */
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 */
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 */
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 */
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;
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;
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;
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;
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;
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;
# ./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)
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)
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)
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)
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);
{
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);
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));
}
}
}
* \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;
* \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);
}
}
-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);
}
* \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);
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);
}
}
}
/**
* \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)
{
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");
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);
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));
}
* 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,
/**
* \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;
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);
}
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);
}
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){
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) {
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;
(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;
}
/**
* \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);
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,
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);
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);
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()
}
//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;
}
//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;
}
//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;
}
//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;
//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) {
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);
}
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);
}
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);
}
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);
}
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);
}
(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;
}
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);
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++;
}
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)
/* 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));
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);
/* 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
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");
}
}
- 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;
}
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 */
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);
/** 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 */
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 */
} 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;
} synchro;
struct {
- smx_host_t host;
+ sg_host_t host;
surf_action_t surf_io;
} io;
};
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;
/* 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);
}
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);
/* 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;
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);
}
}
*/
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;
}
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);
}
}
} 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);
}
}
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
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) {
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);
}
/** @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;
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;
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;
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);
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);
/***************************** 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);
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);
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);
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);
* \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. */
/* 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);
}
/* **** 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);
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;
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),
}
-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));
}
/**
* \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);
* \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);
/**
* \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);
/**
* \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);
/**
* \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);
* 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);
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;
}
* \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);
}
}
-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);
}
* 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);
}
}
-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);
}
* \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);
}
}
-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);
}
* 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);
(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);
}
/**
* \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() */
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);
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);