From: Martin Quinson Date: Wed, 15 Jul 2015 08:05:38 +0000 (+0200) Subject: kill simcall_host_get_by_name: nobody uses it anyway X-Git-Tag: v3_12~497 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d6d6125ce98df87b1f8a2407f3245513847af6cd kill simcall_host_get_by_name: nobody uses it anyway --- diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 7047cb7095..3fca936d2a 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(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); diff --git a/src/simix/libsmx.c b/src/simix/libsmx.c index c26e995bf5..8fe404ae9e 100644 --- a/src/simix/libsmx.c +++ b/src/simix/libsmx.c @@ -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. diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index 245fb0a050..24514ae22f 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -14,19 +14,6 @@ */ -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; } diff --git a/src/simix/popping_bodies.c b/src/simix/popping_bodies.c index 99bee4a923..a4a28c8af3 100644 --- a/src/simix/popping_bodies.c +++ b/src/simix/popping_bodies.c @@ -17,27 +17,6 @@ #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(); diff --git a/src/simix/popping_enum.h b/src/simix/popping_enum.h index a025c25550..f543abda1f 100644 --- a/src/simix/popping_enum.h +++ b/src/simix/popping_enum.h @@ -18,7 +18,6 @@ */ typedef enum { SIMCALL_NONE, - SIMCALL_HOST_GET_BY_NAME, SIMCALL_HOST_GET_NAME, SIMCALL_HOST_ON, SIMCALL_HOST_OFF, diff --git a/src/simix/popping_generated.c b/src/simix/popping_generated.c index 66cd986df3..084a236e29 100644 --- a/src/simix/popping_generated.c +++ b/src/simix/popping_generated.c @@ -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); diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index 5694e6dbc1..3649ebf7c5 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_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)