From 2e579c30e0553e6527b8f33322d49b5d9d5d7453 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 4 Oct 2022 08:54:20 +0200 Subject: [PATCH] Remove deprecated features for next release (3.33). --- MANIFEST.in | 1 - docs/source/Doxyfile | 1 - .../simgrid/kernel/routing/NetZoneImpl.hpp | 2 +- include/simgrid/simix.h | 46 +------------------ include/xbt/base.h | 2 - src/kernel/activity/CommImpl.cpp | 24 ---------- src/kernel/actor/ActorImpl.cpp | 27 ----------- src/s4u/s4u_Engine.cpp | 7 --- src/simix/smx_context.cpp | 36 --------------- tools/cmake/DefinePackages.cmake | 1 - 10 files changed, 2 insertions(+), 145 deletions(-) delete mode 100644 src/simix/smx_context.cpp diff --git a/MANIFEST.in b/MANIFEST.in index 31e97565d3..afd8df8cb6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2399,7 +2399,6 @@ include src/simgrid/sg_config.cpp include src/simgrid/sg_version.cpp include src/simgrid/util.hpp include src/simix/libsmx.cpp -include src/simix/smx_context.cpp include src/smpi/bindings/smpi_f77.cpp include src/smpi/bindings/smpi_f77_coll.cpp include src/smpi/bindings/smpi_f77_comm.cpp diff --git a/docs/source/Doxyfile b/docs/source/Doxyfile index c9ea8a311d..c4a4e1f099 100644 --- a/docs/source/Doxyfile +++ b/docs/source/Doxyfile @@ -69,7 +69,6 @@ PREDEFINED += \ XBT_ATTRIB_NORETURN= \ XBT_ATTRIB_UNUSED= \ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cname,parent,desc)= \ - XBT_ATTRIB_DEPRECATED_v333(mesg)= \ XBT_ATTRIB_DEPRECATED_v334(mesg)= \ XBT_ATTRIB_DEPRECATED_v335(mesg)= \ XBT_ATTRIB_DEPRECATED_v336(mesg)= diff --git a/include/simgrid/kernel/routing/NetZoneImpl.hpp b/include/simgrid/kernel/routing/NetZoneImpl.hpp index 55a1748a6f..30ef1ff71f 100644 --- a/include/simgrid/kernel/routing/NetZoneImpl.hpp +++ b/include/simgrid/kernel/routing/NetZoneImpl.hpp @@ -269,7 +269,7 @@ public: /*** Called on each newly created regular route (not on bypass routes) */ static xbt::signal const& link_list)> - on_route_creation; // XBT_ATTRIB_DEPRECATED_v332 : should be an internal signal used by NS3.. if necessary, + on_route_creation; // FIXME: XBT_ATTRIB_DEPRECATED_v332: should be an internal signal used by NS3.. if necessary, // callback shouldn't use LinkImpl* private: diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index a7b67054ab..f7639e6eeb 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -7,57 +7,13 @@ #define SIMGRID_SIMIX_H #include -#include +// avoid deprecation warning on include (remove entire file with XBT_ATTRIB_DEPRECATED_v335) #ifndef SIMIX_H_NO_DEPRECATED_WARNING #warning simgrid/simix.h is deprecated and will be removed in v3.35. #endif -/******************************* Networking ***********************************/ -SG_BEGIN_DECL - -/* parallelism */ -XBT_ATTRIB_DEPRECATED_v333("Please use kernel::context::is_parallel()") XBT_PUBLIC int SIMIX_context_is_parallel(); -XBT_ATTRIB_DEPRECATED_v333("Please use kernel::context::get_nthreads()") XBT_PUBLIC int SIMIX_context_get_nthreads(); -XBT_ATTRIB_DEPRECATED_v333("Please use kernel::context::set_nthreads()") XBT_PUBLIC - void SIMIX_context_set_nthreads(int nb_threads); -XBT_ATTRIB_DEPRECATED_v333("Please use kernel::context::get_parallel_mode()") XBT_PUBLIC e_xbt_parmap_mode_t - SIMIX_context_get_parallel_mode(); -XBT_ATTRIB_DEPRECATED_v333("Please use kernel::context::set_parallel_mode()") XBT_PUBLIC - void SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode); -XBT_ATTRIB_DEPRECATED_v333("Please use Actor::is_maestro()") XBT_PUBLIC int SIMIX_is_maestro(); - -/********************************** Global ************************************/ -/* Set some code to execute in the maestro (must be used before the engine creation) - * - * If no maestro code is registered (the default), the main thread - * is assumed to be the maestro. */ -XBT_ATTRIB_DEPRECATED_v333("Please use simgrid_set_maestro()") XBT_PUBLIC - void SIMIX_set_maestro(void (*code)(void*), void* data); - -SG_END_DECL - -/********************************* Process ************************************/ -SG_BEGIN_DECL -XBT_ATTRIB_DEPRECATED_v333("Please use kernel::actor::ActorImpl::self()") XBT_PUBLIC #ifdef __cplusplus - simgrid::kernel::actor::ActorImpl* -#else - smx_actor_t -#endif - SIMIX_process_self(); -XBT_ATTRIB_DEPRECATED_v333("Please use xbt_procname()") XBT_PUBLIC const char* SIMIX_process_self_get_name(); -SG_END_DECL - -/****************************** Communication *********************************/ -#ifdef __cplusplus -XBT_ATTRIB_DEPRECATED_v333("Please use Engine::set_default_comm_data_copy_callback()") XBT_PUBLIC - void SIMIX_comm_set_copy_data_callback(void (*callback)(simgrid::kernel::activity::CommImpl*, void*, size_t)); - -XBT_ATTRIB_DEPRECATED_v333("Please use Comm::copy_buffer_callback()") XBT_PUBLIC - void SIMIX_comm_copy_pointer_callback(simgrid::kernel::activity::CommImpl* comm, void* buff, size_t buff_size); -XBT_ATTRIB_DEPRECATED_v333("Please use Comm::copy_pointer_callback()") XBT_PUBLIC - void SIMIX_comm_copy_buffer_callback(simgrid::kernel::activity::CommImpl* comm, void* buff, size_t buff_size); /******************************************************************************/ /* SIMIX simcalls */ diff --git a/include/xbt/base.h b/include/xbt/base.h index c6b9787e6c..a921d1becf 100644 --- a/include/xbt/base.h +++ b/include/xbt/base.h @@ -53,8 +53,6 @@ #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg))) #endif -#define XBT_ATTRIB_DEPRECATED_v333(mesg) \ - XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.32)") #define XBT_ATTRIB_DEPRECATED_v334(mesg) \ XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.33)") #define XBT_ATTRIB_DEPRECATED_v335(mesg) \ diff --git a/src/kernel/activity/CommImpl.cpp b/src/kernel/activity/CommImpl.cpp index ed8a0f4095..0d2171691b 100644 --- a/src/kernel/activity/CommImpl.cpp +++ b/src/kernel/activity/CommImpl.cpp @@ -8,9 +8,6 @@ #include #include -#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v333) -#include - #include "src/kernel/EngineImpl.hpp" #include "src/kernel/activity/CommImpl.hpp" #include "src/kernel/activity/MailboxImpl.hpp" @@ -22,27 +19,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_network, kernel, "Kernel network-related synchronization"); -/******************************************************************************/ -/* SIMIX_comm_copy_data callbacks */ -/******************************************************************************/ -// XBT_ATTRIB_DEPRECATED_v333 -void SIMIX_comm_set_copy_data_callback(void (*callback)(simgrid::kernel::activity::CommImpl*, void*, size_t)) -{ - simgrid::kernel::activity::CommImpl::set_copy_data_callback(callback); -} - -// XBT_ATTRIB_DEPRECATED_v333 -void SIMIX_comm_copy_buffer_callback(simgrid::kernel::activity::CommImpl* comm, void* buff, size_t buff_size) -{ - simgrid::s4u::Comm::copy_buffer_callback(comm, buff, buff_size); -} - -// XBT_ATTRIB_DEPRECATED_v333 -void SIMIX_comm_copy_pointer_callback(simgrid::kernel::activity::CommImpl* comm, void* buff, size_t buff_size) -{ - simgrid::s4u::Comm::copy_pointer_callback(comm, buff, buff_size); -} - namespace simgrid::kernel::activity { xbt::signal CommImpl::on_start; xbt::signal CommImpl::on_completion; diff --git a/src/kernel/actor/ActorImpl.cpp b/src/kernel/actor/ActorImpl.cpp index bb40b4d284..8f3b373617 100644 --- a/src/kernel/actor/ActorImpl.cpp +++ b/src/kernel/actor/ActorImpl.cpp @@ -7,9 +7,6 @@ #include #include -#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v333) -#include - #include "src/kernel/EngineImpl.hpp" #if HAVE_SMPI #include "src/smpi/include/private.hpp" @@ -22,18 +19,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(ker_actor, kernel, "Logging specific to Actor's kernel side"); -/** - * @brief Returns the current agent. - * - * This functions returns the currently running SIMIX process. - * - * @return The SIMIX process - */ -simgrid::kernel::actor::ActorImpl* SIMIX_process_self() // XBT_ATTRIB_DEPRECATED_v333 -{ - return simgrid::kernel::actor::ActorImpl::self(); -} - namespace simgrid::kernel::actor { /*------------------------- [ ActorIDTrait ] -------------------------*/ @@ -521,15 +506,3 @@ void create_maestro(const std::function& code) } } // namespace simgrid::kernel::actor - -/* needs to be public and without simcall because it is called by exceptions and logging events */ -const char* SIMIX_process_self_get_name() // XBT_ATTRIB_DEPRECATED_v333 -{ - return simgrid::s4u::Actor::is_maestro() ? "maestro" : simgrid::kernel::actor::ActorImpl::self()->get_cname(); -} - -int SIMIX_is_maestro() // XBT_ATTRIB_DEPRECATED_v333 -{ - const auto* self = simgrid::kernel::actor::ActorImpl::self(); - return self != nullptr && self->is_maestro(); -} diff --git a/src/s4u/s4u_Engine.cpp b/src/s4u/s4u_Engine.cpp index b768ab40ef..8da467da70 100644 --- a/src/s4u/s4u_Engine.cpp +++ b/src/s4u/s4u_Engine.cpp @@ -9,9 +9,6 @@ #include #include -#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v333) -#include - #include "mc/mc.h" #include "src/instr/instr_private.hpp" #include "src/kernel/EngineImpl.hpp" @@ -504,7 +501,3 @@ void simgrid_set_maestro(void (*code)(void*), void* data) #endif maestro_code = std::bind(code, data); } -void SIMIX_set_maestro(void (*code)(void*), void* data) // XBT_ATTRIB_DEPRECATED_v333 -{ - simgrid_set_maestro(code, data); -} diff --git a/src/simix/smx_context.cpp b/src/simix/smx_context.cpp deleted file mode 100644 index 86e1d7d339..0000000000 --- a/src/simix/smx_context.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* a fast and simple context switching library */ - -/* Copyright (c) 2009-2022. The SimGrid Team. All rights reserved. */ - -/* This program is free software; you can redistribute it and/or modify it - * under the terms of the license (GNU LGPL) which comes with this package. */ - -#include "src/kernel/context/Context.hpp" - -#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v333) -#include - -int SIMIX_context_is_parallel() // XBT_ATTRIB_DEPRECATED_v333 -{ - return simgrid::kernel::context::is_parallel(); -} - -int SIMIX_context_get_nthreads() // XBT_ATTRIB_DEPRECATED_v333 -{ - return simgrid::kernel::context::get_nthreads(); -} - -void SIMIX_context_set_nthreads(int nb_threads) // XBT_ATTRIB_DEPRECATED_v333 -{ - simgrid::kernel::context::set_nthreads(nb_threads); -} - -e_xbt_parmap_mode_t SIMIX_context_get_parallel_mode() // XBT_ATTRIB_DEPRECATED_v333 -{ - return simgrid::kernel::context::get_parallel_mode(); -} - -void SIMIX_context_set_parallel_mode(e_xbt_parmap_mode_t mode) // XBT_ATTRIB_DEPRECATED_v333 -{ - simgrid::kernel::context::set_parallel_mode(mode); -} diff --git a/tools/cmake/DefinePackages.cmake b/tools/cmake/DefinePackages.cmake index eebaf4f067..f3f3500316 100644 --- a/tools/cmake/DefinePackages.cmake +++ b/tools/cmake/DefinePackages.cmake @@ -433,7 +433,6 @@ set(SIMIX_SRC src/kernel/context/ContextThread.cpp src/kernel/context/ContextThread.hpp src/simix/libsmx.cpp - src/simix/smx_context.cpp ) # Boost context may not be available -- 2.20.1