From 4d1a33cbb6a28c29a8d432f10785a24f010b59e5 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 6 Mar 2019 10:22:01 +0100 Subject: [PATCH] Deprecate some functions. --- include/simgrid/simix.h | 10 ++++++---- include/simgrid/simix.hpp | 2 +- src/simix/ActorImpl.cpp | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 4bdd8e86e0..b3c41fbfc9 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -143,9 +143,11 @@ SG_BEGIN_DECL() XBT_PUBLIC int SIMIX_process_count(); XBT_PUBLIC smx_actor_t SIMIX_process_self(); XBT_PUBLIC const char* SIMIX_process_self_get_name(); -XBT_PUBLIC void SIMIX_process_self_set_data(void* data); -XBT_PUBLIC void* SIMIX_process_self_get_data(); -XBT_PUBLIC int SIMIX_process_has_pending_comms(smx_actor_t process); +XBT_ATTRIB_DEPRECATED_v325("Please use ActorImpl::set_user_data()") XBT_PUBLIC + void SIMIX_process_self_set_data(void* data); +XBT_ATTRIB_DEPRECATED_v325("Please use ActorImpl::get_user_data()") XBT_PUBLIC void* SIMIX_process_self_get_data(); +XBT_ATTRIB_DEPRECATED_v325("Please manifest if you actually need this function") XBT_PUBLIC + int SIMIX_process_has_pending_comms(smx_actor_t process); XBT_PUBLIC void SIMIX_process_on_exit(smx_actor_t process, int_f_pvoid_pvoid_t fun, void* data); SG_END_DECL() @@ -164,7 +166,7 @@ XBT_PUBLIC void SIMIX_comm_copy_buffer_callback(simgrid::kernel::activity::CommI size_t buff_size); #endif -XBT_ATTRIB_DEPRECATED_v325("Please use CommImpl::finish") XBT_PUBLIC void SIMIX_comm_finish(smx_activity_t synchro); +XBT_ATTRIB_DEPRECATED_v325("Please use CommImpl::finish()") XBT_PUBLIC void SIMIX_comm_finish(smx_activity_t synchro); /******************************************************************************/ /* SIMIX simcalls */ diff --git a/include/simgrid/simix.hpp b/include/simgrid/simix.hpp index 4e7aeff162..beefa0c127 100644 --- a/include/simgrid/simix.hpp +++ b/include/simgrid/simix.hpp @@ -65,7 +65,7 @@ template typename std::result_of::type simcall(F&& code) return result.get(); } -XBT_ATTRIB_DEPRECATED_v325("Please manifest if you actually need this function.") +XBT_ATTRIB_DEPRECATED_v325("Please manifest if you actually need this function") XBT_PUBLIC const std::vector& process_get_runnable(); // What's executed as SIMIX actor code: diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index e0328fd36e..9268dd42ad 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -41,6 +41,7 @@ smx_actor_t SIMIX_process_self() /** * @brief Returns whether a process has pending asynchronous communications. * @return true if there are asynchronous communications in this process + * @deprecated */ int SIMIX_process_has_pending_comms(smx_actor_t process) { @@ -595,7 +596,7 @@ int SIMIX_process_count() return simix_global->process_list.size(); } -void* SIMIX_process_self_get_data() +void* SIMIX_process_self_get_data() // deprecated { smx_actor_t self = SIMIX_process_self(); @@ -605,7 +606,7 @@ void* SIMIX_process_self_get_data() return self->get_user_data(); } -void SIMIX_process_self_set_data(void *data) +void SIMIX_process_self_set_data(void* data) // deprecated { SIMIX_process_self()->set_user_data(data); } -- 2.20.1