Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill an unused simcall: host_get_name
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 28 Oct 2015 06:54:39 +0000 (07:54 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 28 Oct 2015 06:54:39 +0000 (07:54 +0100)
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 70fc02c..587d046 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(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);
 XBT_PUBLIC(void) simcall_host_off(sg_host_t host);
index b7d9d02..67b8fe8 100644 (file)
@@ -22,18 +22,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix);
 
 #include "popping_bodies.c"
 
-/**
- * \ingroup simix_host_management
- * \brief Returns the name of a host.
- *
- * \param host A SIMIX host
- * \return The name of this host
- */
-const char* simcall_host_get_name(sg_host_t host)
-{
-  return simcall_BODY_host_get_name(host);
-}
-
 /**
  * \ingroup simix_host_management
  * \brief Start the host if it is off
index 951504c..2849332 100644 (file)
  */
 
 
-static inline sg_host_t simcall_host_get_name__get__host(smx_simcall_t simcall) {
-  return (sg_host_t) simcall->args[0].dp;
-}
-static inline void simcall_host_get_name__set__host(smx_simcall_t simcall, void* arg) {
-    simcall->args[0].dp = arg;
-}
-static inline const char* simcall_host_get_name__get__result(smx_simcall_t simcall){
-    return  simcall->result.cc;
-}
-static inline void simcall_host_get_name__set__result(smx_simcall_t simcall, const char* result){
-    simcall->result.cc = result;
-}
-
 static inline sg_host_t simcall_host_on__get__host(smx_simcall_t simcall) {
   return (sg_host_t) simcall->args[0].dp;
 }
index ca4d382..961a2c2 100644 (file)
 #include "src/mc/mc_forward.h"
 #include "xbt/ex.h"
   
-inline static const char* simcall_BODY_host_get_name(sg_host_t host) {
-    smx_process_t self = SIMIX_process_self();
-
-    /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) SIMIX_host_get_name(host);
-    /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
-    self->simcall.call = SIMCALL_HOST_GET_NAME;
-    memset(&self->simcall.result, 0, sizeof(self->simcall.result));
-    memset(self->simcall.args, 0, sizeof(self->simcall.args));
-    self->simcall.args[0].dp = (void*) host;
-    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.cc;
-  }
-  
 inline static void simcall_BODY_host_on(sg_host_t host) {
     smx_process_t self = SIMIX_process_self();
 
index f0519f2..ebd9cca 100644 (file)
@@ -18,7 +18,6 @@
  */
 typedef enum {
   SIMCALL_NONE,
-  SIMCALL_HOST_GET_NAME,
   SIMCALL_HOST_ON,
   SIMCALL_HOST_OFF,
   SIMCALL_HOST_GET_PROPERTIES,
index ac7c775..53be99e 100644 (file)
@@ -23,7 +23,6 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(simix_popping);
 
 /** @brief Simcalls' names (generated from src/simix/simcalls.in) */
 const char* simcall_names[] = {
-  [SIMCALL_HOST_GET_NAME] = "SIMCALL_HOST_GET_NAME",
   [SIMCALL_HOST_ON] = "SIMCALL_HOST_ON",
   [SIMCALL_HOST_OFF] = "SIMCALL_HOST_OFF",
   [SIMCALL_HOST_GET_PROPERTIES] = "SIMCALL_HOST_GET_PROPERTIES",
@@ -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_NAME:
-      simcall->result.cc = SIMIX_host_get_name((sg_host_t) simcall->args[0].dp);
-      SIMIX_simcall_answer(simcall);
-      break;  
-
 case SIMCALL_HOST_ON:
        SIMIX_host_on((sg_host_t) simcall->args[0].dp);
       SIMIX_simcall_answer(simcall);
index 2ada828..f226048 100644 (file)
@@ -46,7 +46,6 @@
 # ./include/simgrid/simix.h (otherwise you will get a warning at the
 # compilation time)
 
-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)
 Func - host_get_properties (void*, xbt_dict_t) (host, void*, sg_host_t)