Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove a useless call
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 31 Jul 2016 15:28:23 +0000 (17:28 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 31 Jul 2016 15:28:23 +0000 (17:28 +0200)
include/simgrid/simix.h
src/s4u/s4u_mailbox.cpp
src/simix/libsmx.cpp

index 6b7f31b..95edc8c 100644 (file)
@@ -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);
 /***** 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);
 
 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);
 
index e49465c..c87c380 100644 (file)
@@ -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.
   // 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);
   if (mbox == nullptr)
     mbox = simcall_mbox_create(name);
   return MailboxPtr(&mbox->piface_, true);
index 626f177..dfbd775 100644 (file)
@@ -621,19 +621,6 @@ smx_mailbox_t simcall_mbox_create(const char *name)
   return simcall_BODY_mbox_create(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
 /**
  *  \ingroup simix_mbox_management
  *  \brief returns the communication at the head of the rendez-vous