MSG_mailbox_put_with_timeout(msg_mailbox_t mailbox, msg_task_t task,
double timeout);
+void MSG_mailbox_set_async(const char *alias);
+
+
/************************** Action handling **********************************/
msg_error_t MSG_action_trace_run(char *path);
return mailbox;
}
+void MSG_mailbox_set_async(const char *alias){
+ msg_mailbox_t mailbox = MSG_mailbox_get_by_alias(alias);
+
+ mailbox->permanent_receiver=SIMIX_process_self();
+ XBT_VERB("%s mailbox set to receive eagerly for process %p\n",alias, SIMIX_process_self());
+
+}
+
msg_error_t
MSG_mailbox_get_task_ext(msg_mailbox_t mailbox, msg_task_t * task,
msg_host_t host, double timeout)
*/
XBT_PUBLIC(int) MSG_mailbox_is_empty(msg_mailbox_t mailbox);
+/* \brief MSG_mailbox_set_async - set a mailbox as eager
+ *
+ * The function MSG_mailbox_set_async sets the mailbox to a permanent receiver mode
+ * Messages sent to this mailbox will then be sent just after the send is issued,
+ * without waiting for the corresponding receive.
+ *
+ * This call should be done before issuing any receive, and on the receiver's side only
+ *
+ * \param alias The alias of the mailbox to modify.
+ *
+ */
+void MSG_mailbox_set_async(const char *alias);
+
/*! \brief MSG_mailbox_get_head - get the task at the head of a mailbox.
*
* The MSG_mailbox_get_head returns the task at the head of the mailbox.