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*) {}
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();
@{ */
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
/* 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);
}
/** @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;