/***** Communication simcalls *****/
-XBT_PUBLIC(void) simcall_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size,
+XBT_PUBLIC(void) simcall_comm_send(smx_process_t sender, smx_rdv_t rdv, double task_size,
double rate, void *src_buff,
size_t src_buff_size,
int (*match_fun)(void *, void *, smx_synchro_t),
void (*copy_data_fun)(smx_synchro_t, void*, size_t),
void *data, double timeout);
-XBT_PUBLIC(smx_synchro_t) simcall_comm_isend(smx_process_t src, smx_rdv_t rdv,
+XBT_PUBLIC(smx_synchro_t) simcall_comm_isend(smx_process_t sender, smx_rdv_t rdv,
double task_size,
double rate, void *src_buff,
size_t src_buff_size,
void (*copy_data_fun)(smx_synchro_t, void*, size_t),
void *data, int detached);
-XBT_PUBLIC(void) simcall_comm_recv(smx_rdv_t rdv, void *dst_buff,
+XBT_PUBLIC(void) simcall_comm_recv(smx_process_t receiver, smx_rdv_t rdv, void *dst_buff,
size_t * dst_buff_size,
int (*match_fun)(void *, void *, smx_synchro_t),
void (*copy_data_fun)(smx_synchro_t, void*, size_t),
void *data, double timeout, double rate);
-XBT_PUBLIC(smx_synchro_t) simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff,
+XBT_PUBLIC(smx_synchro_t) simcall_comm_irecv(smx_process_t receiver, smx_rdv_t rdv, void *dst_buff,
size_t * dst_buff_size,
int (*match_fun)(void *, void *, smx_synchro_t),
void (*copy_data_fun)(smx_synchro_t, void*, size_t),
comm->task_sent = NULL;
comm->task_received = task;
comm->status = MSG_OK;
- comm->s_comm = simcall_comm_irecv(rdv, task, NULL, NULL, NULL, NULL, rate);
+ comm->s_comm = simcall_comm_irecv(MSG_process_self(), rdv, task, NULL, NULL, NULL, NULL, rate);
return comm;
}
/* Try to receive it by calling SIMIX network layer */
TRY {
- simcall_comm_recv(mailbox, task, NULL, NULL, NULL, NULL, timeout, rate);
+ simcall_comm_recv(MSG_process_self(), mailbox, task, NULL, NULL, NULL, NULL, timeout, rate);
XBT_DEBUG("Got task %s from %p",(*task)->name,mailbox);
if (msg_global->debug_multiple_use && (*task)->simdata->isused!=0)
xbt_ex_free(*(xbt_ex_t*)(*task)->simdata->isused);
/**
* \ingroup simix_comm_management
*/
-void simcall_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate,
+void simcall_comm_send(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate,
void *src_buff, size_t src_buff_size,
int (*match_fun)(void *, void *, smx_synchro_t),
void (*copy_data_fun)(smx_synchro_t, void*, size_t), void *data,
if (MC_is_active() || MC_record_replay_is_active()) {
/* the model-checker wants two separate simcalls */
smx_synchro_t comm = NULL; /* MC needs the comm to be set to NULL during the simcall */
- comm = simcall_comm_isend(src, rdv, task_size, rate,
+ comm = simcall_comm_isend(sender, rdv, task_size, rate,
src_buff, src_buff_size, match_fun, NULL, copy_data_fun, data, 0);
simcall_comm_wait(comm, timeout);
comm = NULL;
}
else {
- simcall_BODY_comm_send(src, rdv, task_size, rate, src_buff, src_buff_size,
+ simcall_BODY_comm_send(sender, rdv, task_size, rate, src_buff, src_buff_size,
match_fun, copy_data_fun, data, timeout);
}
}
/**
* \ingroup simix_comm_management
*/
-smx_synchro_t simcall_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate,
+smx_synchro_t simcall_comm_isend(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate,
void *src_buff, size_t src_buff_size,
int (*match_fun)(void *, void *, smx_synchro_t),
void (*clean_fun)(void *),
xbt_assert(rdv, "No rendez-vous point defined for isend");
- return simcall_BODY_comm_isend(src, rdv, task_size, rate, src_buff,
+ return simcall_BODY_comm_isend(sender, rdv, task_size, rate, src_buff,
src_buff_size, match_fun,
clean_fun, copy_data_fun, data, detached);
}
/**
* \ingroup simix_comm_management
*/
-void simcall_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
+void simcall_comm_recv(smx_process_t receiver, smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
int (*match_fun)(void *, void *, smx_synchro_t),
void (*copy_data_fun)(smx_synchro_t, void*, size_t),
void *data, double timeout, double rate)
if (MC_is_active() || MC_record_replay_is_active()) {
/* the model-checker wants two separate simcalls */
smx_synchro_t comm = NULL; /* MC needs the comm to be set to NULL during the simcall */
- comm = simcall_comm_irecv(rdv, dst_buff, dst_buff_size,
+ comm = simcall_comm_irecv(receiver, rdv, dst_buff, dst_buff_size,
match_fun, copy_data_fun, data, rate);
simcall_comm_wait(comm, timeout);
comm = NULL;
}
else {
- simcall_BODY_comm_recv(rdv, dst_buff, dst_buff_size,
+ simcall_BODY_comm_recv(receiver, rdv, dst_buff, dst_buff_size,
match_fun, copy_data_fun, data, timeout, rate);
}
}
/**
* \ingroup simix_comm_management
*/
-smx_synchro_t simcall_comm_irecv(smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size,
+smx_synchro_t simcall_comm_irecv(smx_process_t receiver, smx_rdv_t rdv, void *dst_buff, size_t *dst_buff_size,
int (*match_fun)(void *, void *, smx_synchro_t),
void (*copy_data_fun)(smx_synchro_t, void*, size_t),
void *data, double rate)
{
xbt_assert(rdv, "No rendez-vous point defined for irecv");
- return simcall_BODY_comm_irecv(rdv, dst_buff, dst_buff_size,
+ return simcall_BODY_comm_irecv(receiver, rdv, dst_buff, dst_buff_size,
match_fun, copy_data_fun, data, rate);
}
simcall->result.dp = result;
}
-static inline smx_process_t simcall_comm_send__get__src(smx_simcall_t simcall) {
+static inline smx_process_t simcall_comm_send__get__sender(smx_simcall_t simcall) {
return (smx_process_t) simcall->args[0].dp;
}
-static inline void simcall_comm_send__set__src(smx_simcall_t simcall, void* arg) {
+static inline void simcall_comm_send__set__sender(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
static inline smx_rdv_t simcall_comm_send__get__rdv(smx_simcall_t simcall) {
simcall->args[9].d = arg;
}
-static inline smx_process_t simcall_comm_isend__get__src(smx_simcall_t simcall) {
+static inline smx_process_t simcall_comm_isend__get__sender(smx_simcall_t simcall) {
return (smx_process_t) simcall->args[0].dp;
}
-static inline void simcall_comm_isend__set__src(smx_simcall_t simcall, void* arg) {
+static inline void simcall_comm_isend__set__sender(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
static inline smx_rdv_t simcall_comm_isend__get__rdv(smx_simcall_t simcall) {
simcall->result.dp = result;
}
+static inline smx_process_t simcall_comm_recv__get__receiver(smx_simcall_t simcall) {
+ return (smx_process_t) simcall->args[0].dp;
+}
+static inline void simcall_comm_recv__set__receiver(smx_simcall_t simcall, void* arg) {
+ simcall->args[0].dp = arg;
+}
static inline smx_rdv_t simcall_comm_recv__get__rdv(smx_simcall_t simcall) {
- return (smx_rdv_t) simcall->args[0].dp;
+ return (smx_rdv_t) simcall->args[1].dp;
}
static inline void simcall_comm_recv__set__rdv(smx_simcall_t simcall, void* arg) {
- simcall->args[0].dp = arg;
+ simcall->args[1].dp = arg;
}
static inline void* simcall_comm_recv__get__dst_buff(smx_simcall_t simcall) {
- return simcall->args[1].dp;
+ return simcall->args[2].dp;
}
static inline void simcall_comm_recv__set__dst_buff(smx_simcall_t simcall, void* arg) {
- simcall->args[1].dp = arg;
+ simcall->args[2].dp = arg;
}
static inline size_t* simcall_comm_recv__get__dst_buff_size(smx_simcall_t simcall) {
- return (size_t*) simcall->args[2].dp;
+ return (size_t*) simcall->args[3].dp;
}
static inline void simcall_comm_recv__set__dst_buff_size(smx_simcall_t simcall, void* arg) {
- simcall->args[2].dp = arg;
+ simcall->args[3].dp = arg;
}
static inline simix_match_func_t simcall_comm_recv__get__match_fun(smx_simcall_t simcall) {
- return (simix_match_func_t) simcall->args[3].fp;
+ return (simix_match_func_t) simcall->args[4].fp;
}
static inline void simcall_comm_recv__set__match_fun(smx_simcall_t simcall, FPtr arg) {
- simcall->args[3].fp = arg;
+ simcall->args[4].fp = arg;
}
static inline simix_copy_data_func_t simcall_comm_recv__get__copy_data_fun(smx_simcall_t simcall) {
- return (simix_copy_data_func_t) simcall->args[4].fp;
+ return (simix_copy_data_func_t) simcall->args[5].fp;
}
static inline void simcall_comm_recv__set__copy_data_fun(smx_simcall_t simcall, FPtr arg) {
- simcall->args[4].fp = arg;
+ simcall->args[5].fp = arg;
}
static inline void* simcall_comm_recv__get__data(smx_simcall_t simcall) {
- return simcall->args[5].dp;
+ return simcall->args[6].dp;
}
static inline void simcall_comm_recv__set__data(smx_simcall_t simcall, void* arg) {
- simcall->args[5].dp = arg;
+ simcall->args[6].dp = arg;
}
static inline double simcall_comm_recv__get__timeout(smx_simcall_t simcall) {
- return simcall->args[6].d;
+ return simcall->args[7].d;
}
static inline void simcall_comm_recv__set__timeout(smx_simcall_t simcall, double arg) {
- simcall->args[6].d = arg;
+ simcall->args[7].d = arg;
}
static inline double simcall_comm_recv__get__rate(smx_simcall_t simcall) {
- return simcall->args[7].d;
+ return simcall->args[8].d;
}
static inline void simcall_comm_recv__set__rate(smx_simcall_t simcall, double arg) {
- simcall->args[7].d = arg;
+ simcall->args[8].d = arg;
}
+static inline smx_process_t simcall_comm_irecv__get__receiver(smx_simcall_t simcall) {
+ return (smx_process_t) simcall->args[0].dp;
+}
+static inline void simcall_comm_irecv__set__receiver(smx_simcall_t simcall, void* arg) {
+ simcall->args[0].dp = arg;
+}
static inline smx_rdv_t simcall_comm_irecv__get__rdv(smx_simcall_t simcall) {
- return (smx_rdv_t) simcall->args[0].dp;
+ return (smx_rdv_t) simcall->args[1].dp;
}
static inline void simcall_comm_irecv__set__rdv(smx_simcall_t simcall, void* arg) {
- simcall->args[0].dp = arg;
+ simcall->args[1].dp = arg;
}
static inline void* simcall_comm_irecv__get__dst_buff(smx_simcall_t simcall) {
- return simcall->args[1].dp;
+ return simcall->args[2].dp;
}
static inline void simcall_comm_irecv__set__dst_buff(smx_simcall_t simcall, void* arg) {
- simcall->args[1].dp = arg;
+ simcall->args[2].dp = arg;
}
static inline size_t* simcall_comm_irecv__get__dst_buff_size(smx_simcall_t simcall) {
- return (size_t*) simcall->args[2].dp;
+ return (size_t*) simcall->args[3].dp;
}
static inline void simcall_comm_irecv__set__dst_buff_size(smx_simcall_t simcall, void* arg) {
- simcall->args[2].dp = arg;
+ simcall->args[3].dp = arg;
}
static inline simix_match_func_t simcall_comm_irecv__get__match_fun(smx_simcall_t simcall) {
- return (simix_match_func_t) simcall->args[3].fp;
+ return (simix_match_func_t) simcall->args[4].fp;
}
static inline void simcall_comm_irecv__set__match_fun(smx_simcall_t simcall, FPtr arg) {
- simcall->args[3].fp = arg;
+ simcall->args[4].fp = arg;
}
static inline simix_copy_data_func_t simcall_comm_irecv__get__copy_data_fun(smx_simcall_t simcall) {
- return (simix_copy_data_func_t) simcall->args[4].fp;
+ return (simix_copy_data_func_t) simcall->args[5].fp;
}
static inline void simcall_comm_irecv__set__copy_data_fun(smx_simcall_t simcall, FPtr arg) {
- simcall->args[4].fp = arg;
+ simcall->args[5].fp = arg;
}
static inline void* simcall_comm_irecv__get__data(smx_simcall_t simcall) {
- return simcall->args[5].dp;
+ return simcall->args[6].dp;
}
static inline void simcall_comm_irecv__set__data(smx_simcall_t simcall, void* arg) {
- simcall->args[5].dp = arg;
+ simcall->args[6].dp = arg;
}
static inline double simcall_comm_irecv__get__rate(smx_simcall_t simcall) {
- return simcall->args[6].d;
+ return simcall->args[7].d;
}
static inline void simcall_comm_irecv__set__rate(smx_simcall_t simcall, double arg) {
- simcall->args[6].d = arg;
+ simcall->args[7].d = arg;
}
static inline smx_synchro_t simcall_comm_irecv__get__result(smx_simcall_t simcall){
return (smx_synchro_t) simcall->result.dp;
void simcall_HANDLER_process_execution_wait(smx_simcall_t simcall, smx_synchro_t execution);
smx_process_t simcall_HANDLER_process_restart(smx_simcall_t simcall, smx_process_t process);
smx_synchro_t simcall_HANDLER_comm_iprobe(smx_simcall_t simcall, smx_rdv_t rdv, int type, int src, int tag, simix_match_func_t match_fun, void* data);
-void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout);
-smx_synchro_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached);
-void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate);
-smx_synchro_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate);
+void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout);
+smx_synchro_t simcall_HANDLER_comm_isend(smx_simcall_t simcall, smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached);
+void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_process_t receiver, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate);
+smx_synchro_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_process_t receiver, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate);
void simcall_HANDLER_comm_waitany(smx_simcall_t simcall, xbt_dynar_t comms);
void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_synchro_t comm, double timeout);
void simcall_HANDLER_comm_test(smx_simcall_t simcall, smx_synchro_t comm);
return self->simcall.result.dp;
}
-inline static void simcall_BODY_comm_send(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
+inline static void simcall_BODY_comm_send(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_send(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
+ if (0) simcall_HANDLER_comm_send(&self->simcall, sender, rdv, task_size, rate, src_buff, src_buff_size, match_fun, copy_data_fun, data, timeout);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
self->simcall.call = SIMCALL_COMM_SEND;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
- self->simcall.args[0].dp = (void*) src;
+ self->simcall.args[0].dp = (void*) sender;
self->simcall.args[1].dp = (void*) rdv;
self->simcall.args[2].d = (double) task_size;
self->simcall.args[3].d = (double) rate;
}
-inline static smx_synchro_t simcall_BODY_comm_isend(smx_process_t src, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
+inline static smx_synchro_t simcall_BODY_comm_isend(smx_process_t sender, smx_rdv_t rdv, double task_size, double rate, void* src_buff, size_t src_buff_size, simix_match_func_t match_fun, simix_clean_func_t clean_fun, simix_copy_data_func_t copy_data_fun, void* data, int detached) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_isend(&self->simcall, src, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
+ if (0) simcall_HANDLER_comm_isend(&self->simcall, sender, rdv, task_size, rate, src_buff, src_buff_size, match_fun, clean_fun, copy_data_fun, data, detached);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
self->simcall.call = SIMCALL_COMM_ISEND;
memset(&self->simcall.result, 0, sizeof(self->simcall.result));
memset(self->simcall.args, 0, sizeof(self->simcall.args));
- self->simcall.args[0].dp = (void*) src;
+ self->simcall.args[0].dp = (void*) sender;
self->simcall.args[1].dp = (void*) rdv;
self->simcall.args[2].d = (double) task_size;
self->simcall.args[3].d = (double) rate;
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, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
+inline static void simcall_BODY_comm_recv(smx_process_t receiver, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double timeout, double rate) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_recv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
+ if (0) simcall_HANDLER_comm_recv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, timeout, rate);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
self->simcall.call = SIMCALL_COMM_RECV;
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].fp = (FPtr) copy_data_fun;
- self->simcall.args[5].dp = (void*) data;
- self->simcall.args[6].d = (double) timeout;
- self->simcall.args[7].d = (double) rate;
+ self->simcall.args[0].dp = (void*) receiver;
+ self->simcall.args[1].dp = (void*) rdv;
+ self->simcall.args[2].dp = (void*) dst_buff;
+ self->simcall.args[3].dp = (void*) dst_buff_size;
+ self->simcall.args[4].fp = (FPtr) match_fun;
+ self->simcall.args[5].fp = (FPtr) copy_data_fun;
+ self->simcall.args[6].dp = (void*) data;
+ self->simcall.args[7].d = (double) timeout;
+ self->simcall.args[8].d = (double) rate;
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);
}
-inline static smx_synchro_t simcall_BODY_comm_irecv(smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
+inline static smx_synchro_t simcall_BODY_comm_irecv(smx_process_t receiver, smx_rdv_t rdv, void* dst_buff, size_t* dst_buff_size, simix_match_func_t match_fun, simix_copy_data_func_t copy_data_fun, void* data, double rate) {
smx_process_t self = SIMIX_process_self();
/* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_comm_irecv(&self->simcall, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
+ if (0) simcall_HANDLER_comm_irecv(&self->simcall, receiver, rdv, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate);
/* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
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].fp = (FPtr) copy_data_fun;
- self->simcall.args[5].dp = (void*) data;
- self->simcall.args[6].d = (double) rate;
+ self->simcall.args[0].dp = (void*) receiver;
+ self->simcall.args[1].dp = (void*) rdv;
+ self->simcall.args[2].dp = (void*) dst_buff;
+ self->simcall.args[3].dp = (void*) dst_buff_size;
+ self->simcall.args[4].fp = (FPtr) match_fun;
+ self->simcall.args[5].fp = (FPtr) copy_data_fun;
+ self->simcall.args[6].dp = (void*) data;
+ self->simcall.args[7].d = (double) rate;
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);
break;
case SIMCALL_COMM_RECV:
- simcall_HANDLER_comm_recv(simcall , (smx_rdv_t) simcall->args[0].dp, simcall->args[1].dp, (size_t*) simcall->args[2].dp, (simix_match_func_t) simcall->args[3].fp, (simix_copy_data_func_t) simcall->args[4].fp, simcall->args[5].dp, simcall->args[6].d, simcall->args[7].d);
+ simcall_HANDLER_comm_recv(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp, simcall->args[2].dp, (size_t*) simcall->args[3].dp, (simix_match_func_t) simcall->args[4].fp, (simix_copy_data_func_t) simcall->args[5].fp, simcall->args[6].dp, simcall->args[7].d, simcall->args[8].d);
break;
case SIMCALL_COMM_IRECV:
- simcall->result.dp = simcall_HANDLER_comm_irecv(simcall , (smx_rdv_t) simcall->args[0].dp, simcall->args[1].dp, (size_t*) simcall->args[2].dp, (simix_match_func_t) simcall->args[3].fp, (simix_copy_data_func_t) simcall->args[4].fp, simcall->args[5].dp, simcall->args[6].d);
+ simcall->result.dp = simcall_HANDLER_comm_irecv(simcall , (smx_process_t) simcall->args[0].dp, (smx_rdv_t) simcall->args[1].dp, simcall->args[2].dp, (size_t*) simcall->args[3].dp, (simix_match_func_t) simcall->args[4].fp, (simix_copy_data_func_t) simcall->args[5].fp, simcall->args[6].dp, simcall->args[7].d);
SIMIX_simcall_answer(simcall);
break;
Proc - rdv_set_receiver (void) (rdv, void*, smx_rdv_t) (receiver, void*, smx_process_t)
Func - rdv_get_receiver (void*, smx_process_t) (rdv, void*, smx_rdv_t)
Func H comm_iprobe (void*, smx_synchro_t) (rdv, void*, smx_rdv_t) (type, int) (src, int) (tag, int) (match_fun, FPtr, simix_match_func_t) (data, void*)
-Blck H comm_send (void) (src, void*, smx_process_t) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (timeout, double)
-Func H comm_isend (void*, smx_synchro_t) (src, void*, smx_process_t) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (clean_fun, FPtr, simix_clean_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (detached, int)
-Blck H comm_recv (void) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (timeout, double) (rate, double)
-Func H comm_irecv (void*, smx_synchro_t) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (rate, double)
+Blck H comm_send (void) (sender, void*, smx_process_t) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (timeout, double)
+Func H comm_isend (void*, smx_synchro_t) (sender, void*, smx_process_t) (rdv, void*, smx_rdv_t) (task_size, double) (rate, double) (src_buff, void*) (src_buff_size, size_t) (match_fun, FPtr, simix_match_func_t) (clean_fun, FPtr, simix_clean_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (detached, int)
+Blck H comm_recv (void) (receiver, void*, smx_process_t) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (timeout, double) (rate, double)
+Func H comm_irecv (void*, smx_synchro_t) (receiver, void*, smx_process_t) (rdv, void*, smx_rdv_t) (dst_buff, void*) (dst_buff_size, void*, size_t*) (match_fun, FPtr, simix_match_func_t) (copy_data_fun, FPtr, simix_copy_data_func_t) (data, void*) (rate, double)
Proc - comm_cancel (void) (comm, void*, smx_synchro_t)
Blck H comm_waitany (int) (comms, void*, xbt_dynar_t)
Blck H comm_wait (void) (comm, void*, smx_synchro_t) (timeout, double)
return (detached ? NULL : other_synchro);
}
-void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_rdv_t rdv,
+void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_process_t receiver, smx_rdv_t rdv,
void *dst_buff, size_t *dst_buff_size,
int (*match_fun)(void *, void *, smx_synchro_t),
void (*copy_data_fun)(smx_synchro_t, void*, size_t),
void *data, double timeout, double rate)
{
- smx_synchro_t comm = SIMIX_comm_irecv(simcall->issuer, rdv, dst_buff,
+ smx_synchro_t comm = SIMIX_comm_irecv(receiver, rdv, dst_buff,
dst_buff_size, match_fun, copy_data_fun, data, rate);
SIMCALL_SET_MC_VALUE(simcall, 0);
simcall_HANDLER_comm_wait(simcall, comm, timeout);
}
-smx_synchro_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_rdv_t rdv,
+smx_synchro_t simcall_HANDLER_comm_irecv(smx_simcall_t simcall, smx_process_t receiver, smx_rdv_t rdv,
void *dst_buff, size_t *dst_buff_size,
int (*match_fun)(void *, void *, smx_synchro_t),
void (*copy_data_fun)(smx_synchro_t, void*, size_t),
void *data, double rate)
{
- return SIMIX_comm_irecv(simcall->issuer, rdv, dst_buff, dst_buff_size,
+ return SIMIX_comm_irecv(receiver, rdv, dst_buff, dst_buff_size,
match_fun, copy_data_fun, data, rate);
}
request->real_size=request->size;
smpi_datatype_use(request->old_type);
smpi_comm_use(request->comm);
- request->action = simcall_comm_irecv(mailbox, request->buf,
+ request->action = simcall_comm_irecv(SIMIX_process_self(), mailbox, request->buf,
&request->real_size, &match_recv,
!smpi_process_get_replaying()? &smpi_comm_copy_buffer_callback
: &smpi_comm_null_copy_buffer_callback,