+ SIMIX_request_push(req->issuer);
+ }
+}
+
+smx_action_t SIMIX_req_comm_isend(smx_rdv_t rdv, double task_size, double rate,
+ void *src_buff, size_t src_buff_size,
+ int (*match_fun)(void *, void *),
+ void (*clean_fun)(void *),
+ void *data,
+ int detached)
+{
+ /* checking for infinite values */
+ xbt_assert(isfinite(task_size), "task_size is not finite!");
+ xbt_assert(isfinite(rate), "rate is not finite!");
+
+ xbt_assert(rdv, "No rendez-vous point defined for isend");
+
+ smx_req_t req = SIMIX_req_mine();
+
+ req->call = REQ_COMM_ISEND;
+ req->comm_isend.rdv = rdv;
+ req->comm_isend.task_size = task_size;
+ req->comm_isend.rate = rate;
+ req->comm_isend.src_buff = src_buff;
+ req->comm_isend.src_buff_size = src_buff_size;
+ req->comm_isend.match_fun = match_fun;
+ req->comm_isend.clean_fun = clean_fun;
+ req->comm_isend.data = data;
+ req->comm_isend.detached = detached;
+
+ SIMIX_request_push(req->issuer);
+ return req->comm_isend.result;
+}
+
+void SIMIX_req_comm_recv(smx_rdv_t rdv, void *dst_buff, size_t * dst_buff_size,
+ int (*match_fun)(void *, void *), void *data, double timeout)
+{
+ xbt_assert(isfinite(timeout), "timeout is not finite!");
+ xbt_assert(rdv, "No rendez-vous point defined for recv");
+
+ if (MC_IS_ENABLED) {
+ /* the model-checker wants two separate requests */
+ smx_action_t comm = SIMIX_req_comm_irecv(rdv, dst_buff, dst_buff_size,
+ match_fun, data);
+ SIMIX_req_comm_wait(comm, timeout);
+ }
+ else {
+ smx_req_t req = SIMIX_req_mine();
+
+ req->call = REQ_COMM_RECV;
+ req->comm_recv.rdv = rdv;
+ req->comm_recv.dst_buff = dst_buff;
+ req->comm_recv.dst_buff_size = dst_buff_size;
+ req->comm_recv.match_fun = match_fun;
+ req->comm_recv.data = data;
+ req->comm_recv.timeout = timeout;
+
+ SIMIX_request_push(req->issuer);
+ }