+XBT_INLINE void SIMIX_network_send(smx_rdv_t rdv, double task_size,
+ double rate, double timeout,
+ void *src_buff, size_t src_buff_size,
+ smx_comm_t * comm_ref, void *data)
+{
+ xbt_ex_t e;
+ smx_comm_t comm = *comm_ref =
+ SIMIX_network_isend(rdv, task_size, rate, src_buff, src_buff_size,
+ data);
+ TRY {
+ SIMIX_network_wait(comm, timeout);
+ }
+ TRY_CLEANUP {
+ SIMIX_communication_destroy(comm);
+ }
+ CATCH(e) {
+ RETHROW;
+ }
+}
+
+/**
+ * \brief Put a receive communication request in a rendez-vous point and waits
+ * for its completion (blocking)
+ * \param rdv The rendez-vous point
+ * \param timeout The timeout used for the waiting the completion
+ * \param dst_buff The destination buffer to copy the received message
+ * \param src_buff_size The size of the destination buffer
+ * \param comm_ref The communication object used for the send (useful if someone else wants to cancel this communication afterward)
+ * Throws:
+ * - host_error if peer failed
+ * - timeout_error if communication reached the timeout specified
+ * - network_error if network failed or peer issued a timeout
+ */
+XBT_INLINE void SIMIX_network_recv(smx_rdv_t rdv, double timeout,
+ void *dst_buff, size_t * dst_buff_size,
+ smx_comm_t * comm_ref)
+{
+ xbt_ex_t e;
+ smx_comm_t comm = *comm_ref =
+ (smx_comm_t) SIMIX_network_irecv(rdv, dst_buff, dst_buff_size);
+ TRY {
+ SIMIX_network_wait(comm, timeout);
+ }
+ TRY_CLEANUP {
+ SIMIX_communication_destroy(comm);
+ }
+ CATCH(e) {
+ RETHROW;
+ }
+}
+
+/******************************************************************************/
+/* Asynchronous Communication */
+/******************************************************************************/
+smx_comm_t SIMIX_network_isend(smx_rdv_t rdv, double task_size,
+ double rate, void *src_buff,
+ size_t src_buff_size, void *data)