From dac5d8074d0d4971410ad158c52f1bc6f1dda9a4 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 31 Jul 2016 17:28:23 +0200 Subject: [PATCH 1/1] remove a useless call --- include/simgrid/simix.h | 1 - src/s4u/s4u_mailbox.cpp | 2 +- src/simix/libsmx.cpp | 13 ------------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 6b7f31b086..95edc8c321 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -320,7 +320,6 @@ XBT_PUBLIC(e_smx_state_t) simcall_process_sleep(double duration); /***** Rendez-vous points *****/ XBT_PUBLIC(smx_mailbox_t) simcall_mbox_create(const char *name); -XBT_PUBLIC(smx_mailbox_t) simcall_mbox_get_by_name(const char *name); XBT_PUBLIC(smx_synchro_t) simcall_mbox_front(smx_mailbox_t mbox); XBT_PUBLIC(void) simcall_mbox_set_receiver(smx_mailbox_t mbox , smx_process_t process); diff --git a/src/s4u/s4u_mailbox.cpp b/src/s4u/s4u_mailbox.cpp index e49465c6fa..c87c3808ed 100644 --- a/src/s4u/s4u_mailbox.cpp +++ b/src/s4u/s4u_mailbox.cpp @@ -28,7 +28,7 @@ MailboxPtr Mailbox::byName(const char*name) { // Only one simix object will be created, but two S4U objects will be created. // Only one S4U object will be stored in the hashmap and used, and the other // one will be leaked. - smx_mailbox_t mbox = simcall_mbox_get_by_name(name); + smx_mailbox_t mbox = SIMIX_mbox_get_by_name(name); if (mbox == nullptr) mbox = simcall_mbox_create(name); return MailboxPtr(&mbox->piface_, true); diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 626f177e1f..dfbd77575b 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -621,19 +621,6 @@ smx_mailbox_t simcall_mbox_create(const char *name) return simcall_BODY_mbox_create(name); } -/** - * \ingroup simix_mbox_management - * \brief Returns a rendez-vous point knowing its name - */ -smx_mailbox_t simcall_mbox_get_by_name(const char *name) -{ - /* FIXME: this is a horrible loss of performance, so we hack it out by - * skipping the simcall (for now). It works in parallel, it won't work on - * distributed but probably we will change MSG for that. */ - - return SIMIX_mbox_get_by_name(name); -} - /** * \ingroup simix_mbox_management * \brief returns the communication at the head of the rendez-vous -- 2.20.1