+/*********************************************
+ * File Generated by src/simix/simcalls.py *
+ * from src/simix/simcalls.in *
+ * Do not modify this file, add new simcalls *
+ * in src/simix/simcalls.in *
+ *********************************************/
+
inline static smx_host_t simcall_BODY_host_get_by_name(const char* name) {
smx_process_t self = SIMIX_process_self();
self->simcall.call = SIMCALL_HOST_GET_BY_NAME;
}
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;
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();
}
return self->simcall.result.dp;
}
- inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, void* data, double timeout) {
+ inline static void simcall_BODY_comm_recv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, void* data, double timeout, double rate) {
smx_process_t self = SIMIX_process_self();
self->simcall.call = SIMCALL_COMM_RECV;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
self->simcall.args[3].fp = (FPtr) match_fun;
self->simcall.args[4].dp = (void*) data;
self->simcall.args[5].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);
- }
-
- }
- inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, void* data) {
- smx_process_t self = SIMIX_process_self();
- self->simcall.call = SIMCALL_COMM_IRECV;
- memset(&self->simcall.result, 0, sizeof(self->simcall.result));
- memset(self->simcall.args, 0, sizeof(self->simcall.args));
- self->simcall.args[0].dp = (void*) rdv;
- self->simcall.args[1].dp = (void*) dst_buff;
- self->simcall.args[2].dp = (void*) dst_buff_size;
- self->simcall.args[3].fp = (FPtr) match_fun;
- self->simcall.args[4].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);
- }
- return self->simcall.result.dp;
- }
- inline static void simcall_BODY_comm_recv_bounded(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, void* data, double timeout, double rate) {
- smx_process_t self = SIMIX_process_self();
- self->simcall.call = SIMCALL_COMM_RECV_BOUNDED;
- memset(&self->simcall.result, 0, sizeof(self->simcall.result));
- memset(self->simcall.args, 0, sizeof(self->simcall.args));
- self->simcall.args[0].dp = (void*) rdv;
- self->simcall.args[1].dp = (void*) dst_buff;
- self->simcall.args[2].dp = (void*) dst_buff_size;
- self->simcall.args[3].fp = (FPtr) match_fun;
- self->simcall.args[4].dp = (void*) data;
- self->simcall.args[5].d = (double) timeout;
self->simcall.args[6].d = (double) rate;
if (self != simix_global->maestro_process) {
XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
}
}
- inline static smx_action_t simcall_BODY_comm_irecv_bounded(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, void* data, double rate) {
+ inline static smx_action_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, void* data, double rate) {
smx_process_t self = SIMIX_process_self();
- self->simcall.call = SIMCALL_COMM_IRECV_BOUNDED;
+ self->simcall.call = SIMCALL_COMM_IRECV;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
self->simcall.args[0].dp = (void*) rdv;
}
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;