From 95e80dab793a7aa6c16e7d213af4cc4cdcc09d15 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 8 Mar 2023 16:36:45 +0100 Subject: [PATCH] Depreciate unused functions s4u::Comm::copy_{buffer,pointer}_callback(). --- include/simgrid/s4u/Comm.hpp | 6 ++++-- src/s4u/s4u_Comm.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/simgrid/s4u/Comm.hpp b/include/simgrid/s4u/Comm.hpp index c5f441c1fc..8d1d856883 100644 --- a/include/simgrid/s4u/Comm.hpp +++ b/include/simgrid/s4u/Comm.hpp @@ -53,8 +53,10 @@ public: static void on_start_cb(const std::function& cb) { on_start.connect(cb); } /* More callbacks */ CommPtr set_copy_data_callback(const std::function& callback); - static void copy_buffer_callback(kernel::activity::CommImpl*, void*, size_t); - static void copy_pointer_callback(kernel::activity::CommImpl*, void*, size_t); + XBT_ATTRIB_DEPRECATED_v337("Please manifest if you actually need this function") static void copy_buffer_callback( + kernel::activity::CommImpl*, void*, size_t); + XBT_ATTRIB_DEPRECATED_v337("Please manifest if you actually need this function") static void copy_pointer_callback( + kernel::activity::CommImpl*, void*, size_t); ~Comm() override; diff --git a/src/s4u/s4u_Comm.cpp b/src/s4u/s4u_Comm.cpp index 87174d50fd..6ec1ecd128 100644 --- a/src/s4u/s4u_Comm.cpp +++ b/src/s4u/s4u_Comm.cpp @@ -28,7 +28,8 @@ CommPtr Comm::set_copy_data_callback(const std::functiondst_buff_, buff, buff_size); @@ -39,7 +40,8 @@ void Comm::copy_buffer_callback(kernel::activity::CommImpl* comm, void* buff, si } } -void Comm::copy_pointer_callback(kernel::activity::CommImpl* comm, void* buff, size_t buff_size) +void Comm::copy_pointer_callback(kernel::activity::CommImpl* comm, void* buff, + size_t buff_size) // XBT_ATTRIB_DEPRECATED_v337 { xbt_assert((buff_size == sizeof(void*)), "Cannot copy %zu bytes: must be sizeof(void*)", buff_size); *(void**)(comm->dst_buff_) = buff; -- 2.20.1