+ /* The next chunk is to deal with the fact that for short messages,
+ * if the send occurs before the receive, the message is already sent and
+ * buffered on receiver side when the recv() occurs.
+ *
+ * So the next chunk detects this fact and cancel the simix communication instead.
+ */
+
+ /* make sure the rdv is created on need by asking to MSG instead of simix directly */
+ smx_rdv_t rdv = MSG_mailbox_get_by_alias(mailbox_name);
+ smx_action_t act = SIMIX_comm_get_send_match(rdv,task_matching,NULL);
+ if (act!=NULL){
+ /* FIXME account for the memcopy time if needed */
+ SIMIX_comm_finish(act);
+ return;
+ }
+