be significantly different.
MSG
- * Remove the functions manipulating mailboxes. Use s4u::Mailbox instead
+ * msg_mailbox_t and associated functions. Use s4u::Mailbox instead.
- MSG_mailbox_is_empty() -> Mailbox::empty()
- MSG_mailbox_front() -> Mailbox::front()
- MSG_mailbox_get_by_alias() -> simgrid::s4u::Mailbox::byName(name)
SG_BEGIN_DECL()
-/* ******************************** Mailbox ************************************ */
-
-/** @brief Mailbox datatype
- * @ingroup msg_task_usage
- *
- * Object representing a communication rendez-vous point, on which
- * the sender finds the receiver it wants to communicate with. As a
- * MSG user, you will only rarely manipulate any of these objects
- * directly, since most of the public interface (such as
- * #MSG_task_send and friends) hide this object behind a string
- * alias. That mean that you don't provide the mailbox on which you
- * want to send your task, but only the name of this mailbox. */
-typedef sg_mbox_t msg_mailbox_t;
-
-/* ******************************** Environment ************************************ */
+/* ************************* Autonomous System ****************************** */
typedef simgrid_As *msg_as_t;
/* ******************************** Host ************************************ */
double rate)
{
XBT_DEBUG("MSG_task_receive_ext: Trying to receive a message on mailbox '%s'", alias);
- msg_mailbox_t mailbox = simgrid::s4u::Mailbox::byName(alias);
+ simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(alias);
msg_error_t ret = MSG_OK;
/* We no longer support getting a task from a specific host */
if (host)
{
simdata_task_t t_simdata = nullptr;
msg_process_t myself = SIMIX_process_self();
- msg_mailbox_t mailbox = simgrid::s4u::Mailbox::byName(alias);
+ simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(alias);
int call_end = TRACE_msg_task_put_start(task);
/* Prepare the task to send */
*/
msg_comm_t MSG_task_irecv_bounded(msg_task_t *task, const char *name, double rate)
{
- msg_mailbox_t mbox = simgrid::s4u::Mailbox::byName(name);
+ simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(name);
/* FIXME: these functions are not traceable */
/* Sanity check */
simdata_task_t t_simdata = nullptr;
msg_process_t process = MSG_process_self();
simdata_process_t p_simdata = (simdata_process_t) SIMIX_process_self_get_data();
- msg_mailbox_t mailbox = simgrid::s4u::Mailbox::byName(alias);
+ simgrid::s4u::MailboxPtr mailbox = simgrid::s4u::Mailbox::byName(alias);
int call_end = TRACE_msg_task_put_start(task); //must be after CHECK_HOST()
*/
int MSG_task_listen(const char *alias)
{
- msg_mailbox_t mbox = simgrid::s4u::Mailbox::byName(alias);
+ simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(alias);
return !mbox->empty() ||
(mbox->getImpl()->permanent_receiver && !mbox->getImpl()->done_comm_queue.empty());
}
*/
int MSG_task_listen_from(const char *alias)
{
- msg_mailbox_t mbox = simgrid::s4u::Mailbox::byName(alias);
+ simgrid::s4u::MailboxPtr mbox = simgrid::s4u::Mailbox::byName(alias);
simgrid::kernel::activity::Comm* comm = static_cast<simgrid::kernel::activity::Comm*>(mbox->front());
if (!comm)