Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename simix::Mailbox to simix::MailboxImpl for sake of consistency
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 10 Feb 2017 21:25:35 +0000 (22:25 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 10 Feb 2017 22:57:56 +0000 (23:57 +0100)
include/simgrid/s4u/Mailbox.hpp
include/simgrid/simix.h
src/simix/smx_network.cpp
src/simix/smx_network_private.h

index 07925b5..272aa02 100644 (file)
@@ -106,11 +106,11 @@ namespace s4u {
 XBT_PUBLIC_CLASS Mailbox {
   friend Comm;
   friend simgrid::s4u::Engine;
-  friend simgrid::simix::Mailbox;
+  friend simgrid::simix::MailboxImpl;
 
-  simgrid::simix::Mailbox *pimpl_;
+  simgrid::simix::MailboxImpl* pimpl_;
 
-  explicit Mailbox(smx_mailbox_t mbox): pimpl_(mbox) {}
+  explicit Mailbox(simix::MailboxImpl * mbox) : pimpl_(mbox) {}
 
   /** private function to manage the mailboxes' lifetime (see @ref s4u_raii) */
   friend void intrusive_ptr_add_ref(Mailbox*) {}
@@ -118,7 +118,7 @@ XBT_PUBLIC_CLASS Mailbox {
   friend void intrusive_ptr_release(Mailbox*) {}
 public:
   /** private function, do not use. FIXME: make me protected */
-  smx_mailbox_t getImpl() { return pimpl_; }
+  simix::MailboxImpl* getImpl() { return pimpl_; }
 
   /** Gets the name of that mailbox */
   const char *name();
index 4d861d5..4567233 100644 (file)
@@ -32,14 +32,14 @@ namespace simix {
     @{ */
   class ActorImpl;
   class Mutex;
-  class Mailbox;
+  class MailboxImpl;
 }
 }
 
 typedef simgrid::kernel::context::Context *smx_context_t;
 typedef simgrid::simix::ActorImpl *smx_actor_t;
 typedef simgrid::simix::Mutex   *smx_mutex_t;
-typedef simgrid::simix::Mailbox *smx_mailbox_t;
+typedef simgrid::simix::MailboxImpl* smx_mailbox_t;
 
 #else
 
index 1a4b577..22003ec 100644 (file)
@@ -50,7 +50,7 @@ smx_mailbox_t SIMIX_mbox_create(const char *name)
   /* two processes may have pushed the same mbox_create simcall at the same time */
   smx_mailbox_t mbox = static_cast<smx_mailbox_t>(xbt_dict_get_or_null(mailboxes, name));
   if (!mbox) {
-    mbox = new simgrid::simix::Mailbox(name);
+    mbox = new simgrid::simix::MailboxImpl(name);
     XBT_DEBUG("Creating a mailbox at %p with name %s", mbox, name);
     xbt_dict_set(mailboxes, mbox->name, mbox, nullptr);
   }
index 2e12211..af4ee08 100644 (file)
@@ -20,12 +20,13 @@ namespace simix {
 
 /** @brief Rendez-vous point datatype */
 
-class Mailbox {
+class MailboxImpl {
 public:
-  Mailbox(const char* name) : piface_(this), name(xbt_strdup(name)), comm_queue(MAX_MAILBOX_SIZE), done_comm_queue(MAX_MAILBOX_SIZE) {}
-  ~Mailbox() {
-    xbt_free(name);
+  MailboxImpl(const char* name)
+      : piface_(this), name(xbt_strdup(name)), comm_queue(MAX_MAILBOX_SIZE), done_comm_queue(MAX_MAILBOX_SIZE)
+  {
   }
+  ~MailboxImpl() { xbt_free(name); }
 
   simgrid::s4u::Mailbox piface_; // Our interface
   char* name;