-} s_smx_rvpoint_t;
-
-void SIMIX_network_init(void);
-void SIMIX_network_exit(void);
-
-#ifdef HAVE_LATENCY_BOUND_TRACKING
-XBT_INLINE XBT_PUBLIC(int) SIMIX_comm_is_latency_bounded(smx_action_t comm);
-#endif
-
-smx_rdv_t SIMIX_rdv_create(const char *name);
-void SIMIX_rdv_destroy(smx_rdv_t rdv);
-smx_rdv_t SIMIX_rdv_get_by_name(const char *name);
-XBT_INLINE void SIMIX_rdv_remove(smx_rdv_t rdv, smx_action_t comm);
-int SIMIX_rdv_comm_count_by_host(smx_rdv_t rdv, smx_host_t host);
-smx_action_t SIMIX_rdv_get_head(smx_rdv_t rdv);
-XBT_INLINE void SIMIX_comm_start(smx_action_t action);
-void SIMIX_comm_send(smx_process_t src_proc, smx_rdv_t rdv,
- double task_size, double rate,
- void *src_buff, size_t src_buff_size,
- int (*)(void *, void *), void *data,
- double timeout);
-smx_action_t SIMIX_comm_isend(smx_process_t src_proc, smx_rdv_t rdv,
- double task_size, double rate,
- void *src_buff, size_t src_buff_size,
- int (*)(void *, void *),
- void (*clean_fun)(void *), // used to free the action in case of problem after a detached send
- void *data,
- int detached);
-void SIMIX_comm_recv(smx_process_t dst_proc, smx_rdv_t rdv,
- void *dst_buff, size_t *dst_buff_size,
- int (*)(void *, void *), void *data,
- double timeout);
-smx_action_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_rdv_t rdv,
+ smx_process_t permanent_receiver; //process which the mailbox is attached to
+ xbt_fifo_t done_comm_fifo;//messages already received in the permanent receive mode
+} s_smx_mailbox_t;
+
+XBT_PRIVATE void SIMIX_mailbox_exit(void);
+
+XBT_PRIVATE smx_mailbox_t SIMIX_mbox_create(const char *name);
+XBT_PRIVATE void SIMIX_mbox_destroy(smx_mailbox_t mbox);
+XBT_PRIVATE smx_mailbox_t SIMIX_mbox_get_by_name(const char *name);
+XBT_PRIVATE void SIMIX_mbox_remove(smx_mailbox_t mbox, smx_synchro_t comm);
+XBT_PRIVATE int SIMIX_mbox_comm_count_by_host(smx_mailbox_t mbox, sg_host_t host);
+XBT_PRIVATE smx_synchro_t SIMIX_mbox_get_head(smx_mailbox_t mbox);
+XBT_PRIVATE void SIMIX_mbox_set_receiver(smx_mailbox_t mbox, smx_process_t proc);
+XBT_PRIVATE smx_process_t SIMIX_mbox_get_receiver(smx_mailbox_t mbox);
+XBT_PRIVATE smx_synchro_t SIMIX_comm_irecv(smx_process_t dst_proc, smx_mailbox_t mbox,