+smx_action_t simcall_rdv_get_head(smx_rdv_t rdv)
+{
+ smx_simcall_t simcall = SIMIX_simcall_mine();
+
+ simcall->call = SIMCALL_RDV_GET_HEAD;
+ simcall->rdv_get_head.rdv = rdv;
+
+ SIMIX_simcall_push(simcall->issuer);
+ return simcall->rdv_get_head.result;
+}
+
+void simcall_comm_send(smx_rdv_t rdv, double task_size, double rate,
+ void *src_buff, size_t src_buff_size,
+ int (*match_fun)(void *, void *, smx_action_t), void *data,
+ double timeout)
+{
+ /* checking for infinite values */
+ xbt_assert(isfinite(task_size), "task_size is not finite!");
+ xbt_assert(isfinite(rate), "rate is not finite!");
+ xbt_assert(isfinite(timeout), "timeout is not finite!");
+
+ xbt_assert(rdv, "No rendez-vous point defined for send");
+
+ if (MC_IS_ENABLED) {
+ /* the model-checker wants two separate simcalls */
+ smx_action_t comm = simcall_comm_isend(rdv, task_size, rate,
+ src_buff, src_buff_size, match_fun, NULL, data, 0);
+ simcall_comm_wait(comm, timeout);
+ }
+ else {
+ smx_simcall_t simcall = SIMIX_simcall_mine();
+
+ simcall->call = SIMCALL_COMM_SEND;
+ simcall->comm_send.rdv = rdv;
+ simcall->comm_send.task_size = task_size;
+ simcall->comm_send.rate = rate;
+ simcall->comm_send.src_buff = src_buff;
+ simcall->comm_send.src_buff_size = src_buff_size;
+ simcall->comm_send.match_fun = match_fun;
+ simcall->comm_send.data = data;
+ simcall->comm_send.timeout = timeout;
+
+ SIMIX_simcall_push(simcall->issuer);
+ }
+}
+
+smx_action_t simcall_comm_isend(smx_rdv_t rdv, double task_size, double rate,
+ void *src_buff, size_t src_buff_size,
+ int (*match_fun)(void *, void *, smx_action_t),
+ void (*clean_fun)(void *),
+ void *data,
+ int detached)