Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill msg_mailbox_t entierely
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 31 Jul 2016 19:40:53 +0000 (21:40 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 31 Jul 2016 19:40:53 +0000 (21:40 +0200)
ChangeLog
doc/doxygen/module-msg.doc
include/simgrid/msg.h
src/msg/msg_gos.cpp

index 6b77fc4..c52c5bc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,7 +13,7 @@ SimGrid (3.14) UNRELEASED; urgency=low
    be significantly different.
 
  MSG
    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)
    - MSG_mailbox_is_empty() -> Mailbox::empty()
    - MSG_mailbox_front() -> Mailbox::front()
    - MSG_mailbox_get_by_alias() -> simgrid::s4u::Mailbox::byName(name)
index 0637b31..e2f57c0 100644 (file)
@@ -67,7 +67,7 @@ details).
 
 /** @defgroup msg_mailbox_management Mailbox Management Functions
  *  @ingroup MSG_API
 
 /** @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
  */
 
 /** @defgroup msg_task_usage Task Actions
index ddce32b..f12e73f 100644 (file)
 
 SG_BEGIN_DECL()
 
 
 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 ************************************ */
 typedef simgrid_As *msg_as_t;
 
 /* ******************************** Host ************************************ */
index dea2cee..eac963d 100644 (file)
@@ -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);
                                          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)
   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();
 {
   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 */
   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_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 */
 
   /* 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();
   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 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)
 {
  */
 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());
 }
   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)
 {
  */
 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)
   simgrid::kernel::activity::Comm* comm = static_cast<simgrid::kernel::activity::Comm*>(mbox->front());
 
   if (!comm)