From d468bfe9e511204a05ddff628f356b8966963e55 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 10 Feb 2017 22:25:35 +0100 Subject: [PATCH] rename simix::Mailbox to simix::MailboxImpl for sake of consistency --- include/simgrid/s4u/Mailbox.hpp | 8 ++++---- include/simgrid/simix.h | 4 ++-- src/simix/smx_network.cpp | 2 +- src/simix/smx_network_private.h | 9 +++++---- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/simgrid/s4u/Mailbox.hpp b/include/simgrid/s4u/Mailbox.hpp index 07925b5228..272aa02619 100644 --- a/include/simgrid/s4u/Mailbox.hpp +++ b/include/simgrid/s4u/Mailbox.hpp @@ -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(); diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 4d861d5464..45672338d0 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -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 diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index 1a4b57743c..22003ece7d 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -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(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); } diff --git a/src/simix/smx_network_private.h b/src/simix/smx_network_private.h index 2e12211785..af4ee08210 100644 --- a/src/simix/smx_network_private.h +++ b/src/simix/smx_network_private.h @@ -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; -- 2.20.1