Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill simcall_host_get_by_name: nobody uses it anyway
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 15 Jul 2015 08:05:38 +0000 (10:05 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 18 Jul 2015 18:07:02 +0000 (20:07 +0200)
include/simgrid/simix.h
src/simix/libsmx.c
src/simix/popping_accessors.h
src/simix/popping_bodies.c
src/simix/popping_enum.h
src/simix/popping_generated.c
src/simix/simcalls.in

index 7047cb7..3fca936 100644 (file)
@@ -298,7 +298,6 @@ XBT_PUBLIC(void) SIMIX_comm_finish(smx_synchro_t synchro);
 
 /******************************* Host simcalls ********************************/
 /* TODO use handlers and keep sg_host_t hidden from higher levels */
-XBT_PUBLIC(sg_host_t) simcall_host_get_by_name(const char *name);
 XBT_PUBLIC(const char *) simcall_host_get_name(sg_host_t host);
 XBT_PUBLIC(xbt_dict_t) simcall_host_get_properties(sg_host_t host);
 XBT_PUBLIC(void) simcall_host_on(sg_host_t host);
index c26e995..8fe404a 100644 (file)
@@ -21,18 +21,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
 
 #include "popping_bodies.c"
 
-/**
- * \ingroup simix_host_management
- * \brief Returns a host given its name.
- *
- * \param name The name of the host to get
- * \return The corresponding host
- */
-sg_host_t simcall_host_get_by_name(const char *name)
-{
-  return simcall_BODY_host_get_by_name(name);
-}
-
 /**
  * \ingroup simix_host_management
  * \brief Returns the name of a host.
index 245fb0a..24514ae 100644 (file)
  */
 
 
-static inline const char* simcall_host_get_by_name__get__name(smx_simcall_t simcall) {
-  return  simcall->args[0].cc;
-}
-static inline void simcall_host_get_by_name__set__name(smx_simcall_t simcall, const char* arg) {
-    simcall->args[0].cc = arg;
-}
-static inline sg_host_t simcall_host_get_by_name__get__result(smx_simcall_t simcall){
-    return (sg_host_t) simcall->result.dp;
-}
-static inline void simcall_host_get_by_name__set__result(smx_simcall_t simcall, void* result){
-    simcall->result.dp = result;
-}
-
 static inline sg_host_t simcall_host_get_name__get__host(smx_simcall_t simcall) {
   return (sg_host_t) simcall->args[0].dp;
 }
index 99bee4a..a4a28c8 100644 (file)
 #include "mc/mc_forward.h"
 #include "xbt/ex.h"
   
-inline static sg_host_t simcall_BODY_host_get_by_name(const char* name) {
-    smx_process_t self = SIMIX_process_self();
-
-    /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) sg_host_by_name(name);
-    /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
-    self->simcall.call = SIMCALL_HOST_GET_BY_NAME;
-    memset(&self->simcall.result, 0, sizeof(self->simcall.result));
-    memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].cc = (const char*) name;
-    if (self != simix_global->maestro_process) {
-      XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
-                SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
-      SIMIX_process_yield(self);
-    } else {
-      SIMIX_simcall_handle(&self->simcall, 0);
-    }    
-    return self->simcall.result.dp;
-  }
-  
 inline static const char* simcall_BODY_host_get_name(sg_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
index a025c25..f543abd 100644 (file)
@@ -18,7 +18,6 @@
  */
 typedef enum {
   SIMCALL_NONE,
-  SIMCALL_HOST_GET_BY_NAME,
   SIMCALL_HOST_GET_NAME,
   SIMCALL_HOST_ON,
   SIMCALL_HOST_OFF,
index 66cd986..084a236 100644 (file)
@@ -22,7 +22,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
 
 /** @brief Simcalls' names (generated from src/simix/simcalls.in) */
 const char* simcall_names[] = {
-  [SIMCALL_HOST_GET_BY_NAME] = "SIMCALL_HOST_GET_BY_NAME",
   [SIMCALL_HOST_GET_NAME] = "SIMCALL_HOST_GET_NAME",
   [SIMCALL_HOST_ON] = "SIMCALL_HOST_ON",
   [SIMCALL_HOST_OFF] = "SIMCALL_HOST_OFF",
@@ -168,11 +167,6 @@ void SIMIX_simcall_handle(smx_simcall_t simcall, int value) {
   if (simcall->issuer->context->iwannadie && simcall->call != SIMCALL_PROCESS_CLEANUP)
     return;
   switch (simcall->call) {
-case SIMCALL_HOST_GET_BY_NAME:
-      simcall->result.dp = sg_host_by_name( simcall->args[0].cc);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
 case SIMCALL_HOST_GET_NAME:
       simcall->result.cc = SIMIX_host_get_name((sg_host_t) simcall->args[0].dp);
       SIMIX_simcall_answer(simcall);
index 5694e6d..3649ebf 100644 (file)
@@ -46,7 +46,6 @@
 # ./include/simgrid/simix.h (otherwise you will get a warning at the
 # compilation time)
 
-Func - host_get_by_name (void*, sg_host_t) (name, const char*)
 Func - host_get_name (const char*) (host, void*, sg_host_t)
 Proc - host_on (void) (host, void*, sg_host_t)
 Proc H host_off (void) (host, void*, sg_host_t)