From: Arnaud Giersch Date: Thu, 3 May 2018 13:56:56 +0000 (+0200) Subject: Use kernelImmediate for simcall set_category. X-Git-Tag: v3.20~293 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0c3417410f5e66dd4d165d5435c7ff301483a25d Use kernelImmediate for simcall set_category. --- diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 4f28081527..25aaed1dfd 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -389,7 +389,7 @@ void simcall_set_category(smx_activity_t synchro, const char *category) if (category == nullptr) { return; } - simcall_BODY_set_category(synchro, category); + simgrid::simix::kernelImmediate([synchro, category] { SIMIX_set_category(synchro, category); }); } /** diff --git a/src/simix/popping_accessors.hpp b/src/simix/popping_accessors.hpp index 3a0db683bf..272bbd0b7e 100644 --- a/src/simix/popping_accessors.hpp +++ b/src/simix/popping_accessors.hpp @@ -1257,31 +1257,6 @@ static inline void simcall_mc_random__set__result(smx_simcall_t simcall, int res simgrid::simix::marshal(simcall->result, result); } -static inline boost::intrusive_ptr simcall_set_category__get__synchro(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal>(simcall->args[0]); -} -static inline simgrid::kernel::activity::ActivityImpl* simcall_set_category__getraw__synchro(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args[0]); -} -static inline void simcall_set_category__set__synchro(smx_simcall_t simcall, boost::intrusive_ptr arg) -{ - simgrid::simix::marshal>(simcall->args[0], arg); -} -static inline const char* simcall_set_category__get__category(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal(simcall->args[1]); -} -static inline const char* simcall_set_category__getraw__category(smx_simcall_t simcall) -{ - return simgrid::simix::unmarshal_raw(simcall->args[1]); -} -static inline void simcall_set_category__set__category(smx_simcall_t simcall, const char* arg) -{ - simgrid::simix::marshal(simcall->args[1], arg); -} - static inline std::function const* simcall_run_kernel__get__code(smx_simcall_t simcall) { return simgrid::simix::unmarshal const*>(simcall->args[0]); diff --git a/src/simix/popping_bodies.cpp b/src/simix/popping_bodies.cpp index 15fed6871c..86253284d0 100644 --- a/src/simix/popping_bodies.cpp +++ b/src/simix/popping_bodies.cpp @@ -228,13 +228,6 @@ inline static int simcall_BODY_mc_random(int min, int max) return simcall(SIMCALL_MC_RANDOM, min, max); } -inline static void simcall_BODY_set_category(boost::intrusive_ptr synchro, const char* category) -{ - if (0) /* Go to that function to follow the code flow through the simcall barrier */ - SIMIX_set_category(synchro, category); - return simcall, const char*>(SIMCALL_SET_CATEGORY, synchro, category); -} - inline static void simcall_BODY_run_kernel(std::function const* code) { if (0) /* Go to that function to follow the code flow through the simcall barrier */ diff --git a/src/simix/popping_enum.h b/src/simix/popping_enum.h index fa3e71d248..00a24899d7 100644 --- a/src/simix/popping_enum.h +++ b/src/simix/popping_enum.h @@ -46,7 +46,6 @@ typedef enum { SIMCALL_STORAGE_READ, SIMCALL_STORAGE_WRITE, SIMCALL_MC_RANDOM, - SIMCALL_SET_CATEGORY, SIMCALL_RUN_KERNEL, SIMCALL_RUN_BLOCKING, NUM_SIMCALLS diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index ea1765ceda..cdbe9ad417 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -55,7 +55,6 @@ const char* simcall_names[] = { "SIMCALL_STORAGE_READ", "SIMCALL_STORAGE_WRITE", "SIMCALL_MC_RANDOM", - "SIMCALL_SET_CATEGORY", "SIMCALL_RUN_KERNEL", "SIMCALL_RUN_BLOCKING", }; @@ -197,11 +196,6 @@ case SIMCALL_MC_RANDOM: SIMIX_simcall_answer(simcall); break; -case SIMCALL_SET_CATEGORY: - SIMIX_set_category(simgrid::simix::unmarshal>(simcall->args[0]), simgrid::simix::unmarshal(simcall->args[1])); - SIMIX_simcall_answer(simcall); - break; - case SIMCALL_RUN_KERNEL: SIMIX_run_kernel(simgrid::simix::unmarshal const*>(simcall->args[0])); SIMIX_simcall_answer(simcall); diff --git a/src/simix/simcalls.in b/src/simix/simcalls.in index c72d961563..d5f72d814b 100644 --- a/src/simix/simcalls.in +++ b/src/simix/simcalls.in @@ -69,7 +69,6 @@ sg_size_t storage_read(surf_storage_t st, sg_size_t size) [[block]]; sg_size_t storage_write(surf_storage_t st, sg_size_t size) [[block]]; int mc_random(int min, int max); -void set_category(boost::intrusive_ptr synchro, const char* category) [[nohandler]]; void run_kernel(std::function const* code) [[nohandler]]; void run_blocking(std::function const* code) [[block,nohandler]];