X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/11af893fb278cc4b9b1fee154edbfdd0c6afce67..027295612d642dab025657808b3ab22304644aae:/src/simix/simcalls_generated_body.c diff --git a/src/simix/simcalls_generated_body.c b/src/simix/simcalls_generated_body.c index 7ad2b3a3b0..c0f636f2dd 100644 --- a/src/simix/simcalls_generated_body.c +++ b/src/simix/simcalls_generated_body.c @@ -155,37 +155,6 @@ } return self->simcall.result.i; } - inline static void* simcall_BODY_host_get_data(smx_host_t host) { - smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_HOST_GET_DATA; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) host; - if (self != simix_global->maestro_process) { - XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, - SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); - SIMIX_process_yield(self); - } else { - SIMIX_simcall_pre(&self->simcall, 0); - } - return self->simcall.result.dp; - } - inline static void simcall_BODY_host_set_data(smx_host_t host, void* data) { - smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_HOST_SET_DATA; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) host; - self->simcall.args[1].dp = (void*) data; - if (self != simix_global->maestro_process) { - XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, - SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); - SIMIX_process_yield(self); - } else { - SIMIX_simcall_pre(&self->simcall, 0); - } - - } inline static double simcall_BODY_host_get_current_power_peak(smx_host_t host) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_HOST_GET_CURRENT_POWER_PEAK; @@ -428,9 +397,24 @@ } return self->simcall.result.i; } - inline static xbt_dict_t simcall_BODY_host_get_storage_list(smx_host_t host) { + inline static xbt_dict_t simcall_BODY_host_get_mounted_storage_list(smx_host_t host) { smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_HOST_GET_STORAGE_LIST; + self->simcall.call = SIMCALL_HOST_GET_MOUNTED_STORAGE_LIST; + memset(&self->simcall.result, 0, sizeof(self->simcall.result)); + memset(self->simcall.args, 0, sizeof(self->simcall.args)); + self->simcall.args[0].dp = (void*) host; + if (self != simix_global->maestro_process) { + XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, + SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); + SIMIX_process_yield(self); + } else { + SIMIX_simcall_pre(&self->simcall, 0); + } + return self->simcall.result.dp; + } + inline static xbt_dynar_t simcall_BODY_host_get_attached_storage_list(smx_host_t host) { + smx_process_t self = SIMIX_process_self(); + self->simcall.call = SIMCALL_HOST_GET_ATTACHED_STORAGE_LIST; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); self->simcall.args[0].dp = (void*) host; @@ -505,22 +489,6 @@ SIMIX_simcall_pre(&self->simcall, 0); } - } - inline static void simcall_BODY_vm_set_state(smx_host_t ind_vm, int state) { - smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_VM_SET_STATE; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) ind_vm; - self->simcall.args[1].i = (int) state; - if (self != simix_global->maestro_process) { - XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, - SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); - SIMIX_process_yield(self); - } else { - SIMIX_simcall_pre(&self->simcall, 0); - } - } inline static int simcall_BODY_vm_get_state(smx_host_t ind_vm) { smx_process_t self = SIMIX_process_self(); @@ -942,6 +910,22 @@ } return self->simcall.result.dp; } + inline static int simcall_BODY_process_join(smx_process_t process, double timeout) { + smx_process_t self = SIMIX_process_self(); + self->simcall.call = SIMCALL_PROCESS_JOIN; + memset(&self->simcall.result, 0, sizeof(self->simcall.result)); + memset(self->simcall.args, 0, sizeof(self->simcall.args)); + self->simcall.args[0].dp = (void*) process; + self->simcall.args[1].d = (double) timeout; + if (self != simix_global->maestro_process) { + XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, + SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); + SIMIX_process_yield(self); + } else { + SIMIX_simcall_pre(&self->simcall, 0); + } + return self->simcall.result.i; + } inline static int simcall_BODY_process_sleep(double duration) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_PROCESS_SLEEP; @@ -957,7 +941,7 @@ } return self->simcall.result.i; } - inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_t fun, void* data) { + inline static void simcall_BODY_process_on_exit(smx_process_t process, int_f_pvoid_pvoid_t fun, void* data) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_PROCESS_ON_EXIT; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); @@ -1035,21 +1019,6 @@ } } - inline static smx_host_t simcall_BODY_rdv_get_by_name(const char* name) { - smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_RDV_GET_BY_NAME; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].cc = (const char*) name; - if (self != simix_global->maestro_process) { - XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, - SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); - SIMIX_process_yield(self); - } else { - SIMIX_simcall_pre(&self->simcall, 0); - } - return self->simcall.result.dp; - } inline static unsigned int simcall_BODY_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_RDV_COMM_COUNT_BY_HOST; @@ -1217,21 +1186,6 @@ } return self->simcall.result.dp; } - inline static void simcall_BODY_comm_destroy(smx_action_t comm) { - smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_COMM_DESTROY; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) comm; - if (self != simix_global->maestro_process) { - XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, - SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); - SIMIX_process_yield(self); - } else { - SIMIX_simcall_pre(&self->simcall, 0); - } - - } inline static void simcall_BODY_comm_cancel(smx_action_t comm) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_COMM_CANCEL; @@ -1672,44 +1626,14 @@ } return self->simcall.result.i; } - inline static void* simcall_BODY_file_get_data(smx_file_t fd) { - smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_FILE_GET_DATA; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) fd; - if (self != simix_global->maestro_process) { - XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, - SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); - SIMIX_process_yield(self); - } else { - SIMIX_simcall_pre(&self->simcall, 0); - } - return self->simcall.result.dp; - } - inline static void simcall_BODY_file_set_data(smx_file_t fd, void* data) { - smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_FILE_SET_DATA; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) fd; - self->simcall.args[1].dp = (void*) data; - if (self != simix_global->maestro_process) { - XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, - SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); - SIMIX_process_yield(self); - } else { - SIMIX_simcall_pre(&self->simcall, 0); - } - - } - inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size) { + inline static sg_size_t simcall_BODY_file_read(smx_file_t fd, sg_size_t size, smx_host_t host) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_FILE_READ; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); self->simcall.args[0].dp = (void*) fd; self->simcall.args[1].sgsz = (sg_size_t) size; + self->simcall.args[2].dp = (void*) host; if (self != simix_global->maestro_process) { XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); @@ -1719,13 +1643,14 @@ } return self->simcall.result.sgsz; } - inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size) { + inline static sg_size_t simcall_BODY_file_write(smx_file_t fd, sg_size_t size, smx_host_t host) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_FILE_WRITE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); self->simcall.args[0].dp = (void*) fd; self->simcall.args[1].sgsz = (sg_size_t) size; + self->simcall.args[2].dp = (void*) host; if (self != simix_global->maestro_process) { XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); @@ -1735,13 +1660,13 @@ } return self->simcall.result.sgsz; } - inline static smx_file_t simcall_BODY_file_open(const char* mount, const char* path) { + inline static smx_file_t simcall_BODY_file_open(const char* fullpath, smx_host_t host) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_FILE_OPEN; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].cc = (const char*) mount; - self->simcall.args[1].cc = (const char*) path; + self->simcall.args[0].cc = (const char*) fullpath; + self->simcall.args[1].dp = (void*) host; if (self != simix_global->maestro_process) { XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); @@ -1751,12 +1676,13 @@ } return self->simcall.result.dp; } - inline static int simcall_BODY_file_close(smx_file_t fd) { + inline static int simcall_BODY_file_close(smx_file_t fd, smx_host_t host) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_FILE_CLOSE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); self->simcall.args[0].dp = (void*) fd; + self->simcall.args[1].dp = (void*) host; if (self != simix_global->maestro_process) { XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); @@ -1781,22 +1707,6 @@ } return self->simcall.result.i; } - inline static xbt_dict_t simcall_BODY_file_ls(const char* mount, const char* path) { - smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_FILE_LS; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].cc = (const char*) mount; - self->simcall.args[1].cc = (const char*) path; - if (self != simix_global->maestro_process) { - XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, - SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); - SIMIX_process_yield(self); - } else { - SIMIX_simcall_pre(&self->simcall, 0); - } - return self->simcall.result.dp; - } inline static sg_size_t simcall_BODY_file_get_size(smx_file_t fd) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_FILE_GET_SIZE; @@ -1859,14 +1769,13 @@ } return self->simcall.result.dp; } - inline static void simcall_BODY_storage_file_rename(smx_storage_t storage, const char* src, const char* dest) { + inline static int simcall_BODY_file_move(smx_file_t fd, const char* fullpath) { smx_process_t self = SIMIX_process_self(); - self->simcall.call = SIMCALL_STORAGE_FILE_RENAME; + self->simcall.call = SIMCALL_FILE_MOVE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) storage; - self->simcall.args[1].cc = (const char*) src; - self->simcall.args[2].cc = (const char*) dest; + self->simcall.args[0].dp = (void*) fd; + self->simcall.args[1].cc = (const char*) fullpath; if (self != simix_global->maestro_process) { XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); @@ -1874,14 +1783,14 @@ } else { SIMIX_simcall_pre(&self->simcall, 0); } - + return self->simcall.result.i; } - inline static sg_size_t simcall_BODY_storage_get_free_size(const char* name) { + inline static sg_size_t simcall_BODY_storage_get_free_size(smx_storage_t storage) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_STORAGE_GET_FREE_SIZE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].cc = (const char*) name; + self->simcall.args[0].dp = (void*) storage; if (self != simix_global->maestro_process) { XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call); @@ -1891,12 +1800,12 @@ } return self->simcall.result.sgsz; } - inline static sg_size_t simcall_BODY_storage_get_used_size(const char* name) { + inline static sg_size_t simcall_BODY_storage_get_used_size(smx_storage_t name) { smx_process_t self = SIMIX_process_self(); self->simcall.call = SIMCALL_STORAGE_GET_USED_SIZE; memset(&self->simcall.result, 0, sizeof(self->simcall.result)); memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].cc = (const char*) name; + self->simcall.args[0].dp = (void*) name; if (self != simix_global->maestro_process) { XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name, SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);