From c987f60dfea775b1675a01e76f05bd723aa3e992 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 1 Aug 2016 17:06:39 +0200 Subject: [PATCH] remove a useless dirty hack for SMPI+MSG Probably dating from the time where SMPI was C and not C++. --- src/kernel/context/Context.cpp | 6 ------ src/kernel/context/Context.hpp | 3 --- src/smpi/smpi_global.cpp | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/kernel/context/Context.cpp b/src/kernel/context/Context.cpp index 29393ea87e..21b8e06991 100644 --- a/src/kernel/context/Context.cpp +++ b/src/kernel/context/Context.cpp @@ -17,12 +17,6 @@ #include "src/kernel/context/Context.hpp" #include "src/simix/smx_private.h" -void SIMIX_process_set_cleanup_function( - smx_process_t process, void_pfn_smxprocess_t cleanup) -{ - process->context->set_cleanup(cleanup); -} - /** * @brief creates a new context for a user level process * @param code a main function diff --git a/src/kernel/context/Context.hpp b/src/kernel/context/Context.hpp index cfd5b410de..a604581f0c 100644 --- a/src/kernel/context/Context.hpp +++ b/src/kernel/context/Context.hpp @@ -196,9 +196,6 @@ XBT_PUBLIC(int) SIMIX_process_get_maxpid(void); XBT_PRIVATE void SIMIX_post_create_environment(void); -// FIXME, Dirty hack for SMPI+MSG -XBT_PRIVATE void SIMIX_process_set_cleanup_function(smx_process_t process, void_pfn_smxprocess_t cleanup); - SG_END_DECL() XBT_PRIVATE simgrid::simix::ActorCodeFactory& SIMIX_get_actor_code_factory(const char *name); diff --git a/src/smpi/smpi_global.cpp b/src/smpi/smpi_global.cpp index 7767c885e4..d7eec995bd 100644 --- a/src/smpi/smpi_global.cpp +++ b/src/smpi/smpi_global.cpp @@ -99,7 +99,7 @@ void smpi_process_init(int *argc, char ***argv) if (argc != nullptr && argv != nullptr) { smx_process_t proc = SIMIX_process_self(); - SIMIX_process_set_cleanup_function(proc, MSG_process_cleanup_from_SIMIX); + proc->context->set_cleanup(MSG_process_cleanup_from_SIMIX); char* instance_id = (*argv)[1]; int rank = xbt_str_parse_int((*argv)[2], "Invalid rank: %s"); int index = smpi_process_index_of_smx_process(proc); -- 2.20.1