From: Martin Quinson Date: Sun, 31 Jul 2016 19:40:53 +0000 (+0200) Subject: kill msg_mailbox_t entierely X-Git-Tag: v3_14~676 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/99149d9a7fb61c938c70478ae8196ec37876b17f?ds=inline kill msg_mailbox_t entierely --- diff --git a/ChangeLog b/ChangeLog index 6b77fc4bea..c52c5bc2bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -13,7 +13,7 @@ SimGrid (3.14) UNRELEASED; urgency=low 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) diff --git a/doc/doxygen/module-msg.doc b/doc/doxygen/module-msg.doc index 0637b31a97..e2f57c05c9 100644 --- a/doc/doxygen/module-msg.doc +++ b/doc/doxygen/module-msg.doc @@ -67,7 +67,7 @@ details). /** @defgroup msg_mailbox_management Mailbox Management Functions * @ingroup MSG_API - * @brief Mailbox structure of MSG (#msg_mailbox_t) and associated functions. + * @brief Functions associated to mailboxes. */ /** @defgroup msg_task_usage Task Actions diff --git a/include/simgrid/msg.h b/include/simgrid/msg.h index ddce32be49..f12e73ff73 100644 --- a/include/simgrid/msg.h +++ b/include/simgrid/msg.h @@ -14,21 +14,7 @@ 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 ************************************ */ diff --git a/src/msg/msg_gos.cpp b/src/msg/msg_gos.cpp index dea2cee0fa..eac963dfcc 100644 --- a/src/msg/msg_gos.cpp +++ b/src/msg/msg_gos.cpp @@ -260,7 +260,7 @@ msg_error_t MSG_task_receive_ext_bounded(msg_task_t * task, const char *alias, d 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) @@ -311,7 +311,7 @@ static inline msg_comm_t MSG_task_isend_internal(msg_task_t task, const char *al { 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 */ @@ -463,7 +463,7 @@ msg_comm_t MSG_task_irecv(msg_task_t *task, const char *name) */ 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 */ @@ -785,7 +785,7 @@ msg_error_t MSG_task_send_with_timeout(msg_task_t task, const char *alias, doubl 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() @@ -864,7 +864,7 @@ msg_error_t MSG_task_send_with_timeout_bounded(msg_task_t task, const char *alia */ 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()); } @@ -879,7 +879,7 @@ int MSG_task_listen(const char *alias) */ 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(mbox->front()); if (!comm)