From f5acac9da28f84a6625be7afaa01fc4ec6c643e7 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 5 May 2016 22:02:58 +0200 Subject: [PATCH] kill an unused simcall: comm_get_state --- include/simgrid/simix.h | 1 - src/simix/libsmx.cpp | 9 --------- src/simix/popping_accessors.h | 13 ------------- src/simix/popping_bodies.cpp | 21 --------------------- src/simix/popping_enum.h | 1 - src/simix/popping_generated.cpp | 6 ------ src/simix/simcalls.in | 1 - 7 files changed, 52 deletions(-) diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index ce3e6c5ee9..e0ec0ed653 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -402,7 +402,6 @@ XBT_PUBLIC(int) simcall_comm_testany(xbt_dynar_t comms); /* Getters and setters */ XBT_PUBLIC(double) simcall_comm_get_remains(smx_synchro_t comm); -XBT_PUBLIC(e_smx_state_t) simcall_comm_get_state(smx_synchro_t comm); XBT_PUBLIC(void *) simcall_comm_get_src_data(smx_synchro_t comm); XBT_PUBLIC(void *) simcall_comm_get_dst_data(smx_synchro_t comm); XBT_PUBLIC(smx_process_t) simcall_comm_get_src_proc(smx_synchro_t comm); diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 7924a4f5f8..e052a98fdb 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -893,15 +893,6 @@ double simcall_comm_get_remains(smx_synchro_t comm) return simcall_BODY_comm_get_remains(comm); } -/** - * \ingroup simix_comm_management - * - */ -e_smx_state_t simcall_comm_get_state(smx_synchro_t comm) -{ - return simcall_BODY_comm_get_state(comm); -} - /** * \ingroup simix_comm_management * diff --git a/src/simix/popping_accessors.h b/src/simix/popping_accessors.h index fe2c29cf82..d98bbc2a91 100644 --- a/src/simix/popping_accessors.h +++ b/src/simix/popping_accessors.h @@ -843,19 +843,6 @@ static inline void simcall_comm_get_remains__set__result(smx_simcall_t simcall, simcall->result.d = result; } -static inline smx_synchro_t simcall_comm_get_state__get__comm(smx_simcall_t simcall) { - return (smx_synchro_t) simcall->args[0].dp; -} -static inline void simcall_comm_get_state__set__comm(smx_simcall_t simcall, void* arg) { - simcall->args[0].dp = arg; -} -static inline e_smx_state_t simcall_comm_get_state__get__result(smx_simcall_t simcall){ - return (e_smx_state_t) simcall->result.i; -} -static inline void simcall_comm_get_state__set__result(smx_simcall_t simcall, int result){ - simcall->result.i = result; -} - static inline smx_synchro_t simcall_comm_get_src_data__get__comm(smx_simcall_t simcall) { return (smx_synchro_t) simcall->args[0].dp; } diff --git a/src/simix/popping_bodies.cpp b/src/simix/popping_bodies.cpp index bfc0c86062..ffb3331c43 100644 --- a/src/simix/popping_bodies.cpp +++ b/src/simix/popping_bodies.cpp @@ -989,27 +989,6 @@ inline static double simcall_BODY_comm_get_remains(smx_synchro_t comm) { return (double) self->simcall.result.d; } -inline static e_smx_state_t simcall_BODY_comm_get_state(smx_synchro_t comm) { - smx_process_t self = SIMIX_process_self(); - - /* Go to that function to follow the code flow through the simcall barrier */ - if (0) SIMIX_comm_get_state(comm); - /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */ - - self->simcall.call = SIMCALL_COMM_GET_STATE; - memset(&self->simcall.result, 0, sizeof(self->simcall.result)); - memset(self->simcall.args, 0, sizeof(self->simcall.args)); - self->simcall.args[0].dp = (void*) comm; - 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 (e_smx_state_t) self->simcall.result.i; - } - inline static void* simcall_BODY_comm_get_src_data(smx_synchro_t comm) { smx_process_t self = SIMIX_process_self(); diff --git a/src/simix/popping_enum.h b/src/simix/popping_enum.h index f2af98f360..cbac010c0b 100644 --- a/src/simix/popping_enum.h +++ b/src/simix/popping_enum.h @@ -61,7 +61,6 @@ typedef enum { SIMCALL_COMM_TEST, SIMCALL_COMM_TESTANY, SIMCALL_COMM_GET_REMAINS, - SIMCALL_COMM_GET_STATE, SIMCALL_COMM_GET_SRC_DATA, SIMCALL_COMM_GET_DST_DATA, SIMCALL_COMM_GET_SRC_PROC, diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index 3498a660bd..1d8618988a 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -66,7 +66,6 @@ const char* simcall_names[] = { "SIMCALL_COMM_TEST", "SIMCALL_COMM_TESTANY", "SIMCALL_COMM_GET_REMAINS", - "SIMCALL_COMM_GET_STATE", "SIMCALL_COMM_GET_SRC_DATA", "SIMCALL_COMM_GET_DST_DATA", "SIMCALL_COMM_GET_SRC_PROC", @@ -321,11 +320,6 @@ case SIMCALL_COMM_GET_REMAINS: SIMIX_simcall_answer(simcall); break; -case SIMCALL_COMM_GET_STATE: - simcall->result.i = SIMIX_comm_get_state((smx_synchro_t) simcall->args[0].dp); - SIMIX_simcall_answer(simcall); - break; - case SIMCALL_COMM_GET_SRC_DATA: simcall->result.dp = SIMIX_comm_get_src_data((smx_synchro_t) simcall->args[0].dp); SIMIX_simcall_answer(simcall); diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index 7ac294f291..aaabae51aa 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -94,7 +94,6 @@ Blck H comm_wait (void) (comm, void*, smx_synchro_t) (timeout, double) Blck H comm_test (int) (comm, void*, smx_synchro_t) Blck H comm_testany (int) (comms, void*, xbt_dynar_t) Func - comm_get_remains (double) (comm, void*, smx_synchro_t) -Func - comm_get_state (int, e_smx_state_t) (comm, void*, smx_synchro_t) Func - comm_get_src_data (void*) (comm, void*, smx_synchro_t) Func - comm_get_dst_data (void*) (comm, void*, smx_synchro_t) Func - comm_get_src_proc (void*, smx_process_t) (comm, void*, smx_synchro_t) -- 2.20.1