From: Martin Quinson Date: Wed, 28 Oct 2015 06:54:39 +0000 (+0100) Subject: Kill an unused simcall: host_get_name X-Git-Tag: v3_13~1620 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d5fc777ebb223e63cbaab9c2c78cb9a8f66b019a?hp=cdee945b9c5436eaada21ee7b942f63d7a67df49 Kill an unused simcall: host_get_name --- diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 70fc02cba3..587d046102 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -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); diff --git a/src/simix/libsmx.c b/src/simix/libsmx.c index b7d9d02a75..67b8fe88cd 100644 --- a/src/simix/libsmx.c +++ b/src/simix/libsmx.c @@ -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 diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index 951504c58e..2849332795 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -14,19 +14,6 @@ */ -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; } diff --git a/src/simix/popping_bodies.c b/src/simix/popping_bodies.c index ca4d3822c8..961a2c20e8 100644 --- a/src/simix/popping_bodies.c +++ b/src/simix/popping_bodies.c @@ -17,27 +17,6 @@ #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(); diff --git a/src/simix/popping_enum.h b/src/simix/popping_enum.h index f0519f2a1d..ebd9cca3e3 100644 --- a/src/simix/popping_enum.h +++ b/src/simix/popping_enum.h @@ -18,7 +18,6 @@ */ typedef enum { SIMCALL_NONE, - SIMCALL_HOST_GET_NAME, SIMCALL_HOST_ON, SIMCALL_HOST_OFF, SIMCALL_HOST_GET_PROPERTIES, diff --git a/src/simix/popping_generated.c b/src/simix/popping_generated.c index ac7c7758e4..53be99e95a 100644 --- a/src/simix/popping_generated.c +++ b/src/simix/popping_generated.c @@ -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); diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index 2ada8283a8..f22604835e 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -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)