From 05a8b92b9fa2fb4830a95a384ab6cfdba046ad1d Mon Sep 17 00:00:00 2001 From: Frederic Suter Date: Sun, 3 Feb 2019 18:08:36 +0100 Subject: [PATCH] further cleaning in simcalls --- include/simgrid/simix.h | 2 -- src/msg/msg_task.cpp | 2 +- src/simix/libsmx.cpp | 25 ------------------------- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h index 748f4a5a96..b75e5a85c3 100644 --- a/include/simgrid/simix.h +++ b/include/simgrid/simix.h @@ -196,7 +196,6 @@ XBT_ATTRIB_DEPRECATED_v324("Please use ActorImpl::throw_exception") XBT_PUBLIC XBT_PUBLIC void simcall_process_suspend(smx_actor_t process); /* Getters and Setters */ -XBT_PUBLIC void simcall_process_set_data(smx_actor_t process, void* data); XBT_PUBLIC void simcall_process_set_kill_time(smx_actor_t process, double kill_time); XBT_PUBLIC void simcall_process_join(smx_actor_t process, double timeout); /* Sleep control */ @@ -233,7 +232,6 @@ XBT_PUBLIC smx_activity_t simcall_comm_iprobe(smx_mailbox_t mbox, int type, int (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), void* data); #endif -XBT_PUBLIC void simcall_comm_cancel(smx_activity_t comm); /* FIXME: waitany is going to be a vararg function, and should take a timeout */ XBT_PUBLIC unsigned int simcall_comm_waitany(xbt_dynar_t comms, double timeout); diff --git a/src/msg/msg_task.cpp b/src/msg/msg_task.cpp index bf8de7e43c..d7fbc112f9 100644 --- a/src/msg/msg_task.cpp +++ b/src/msg/msg_task.cpp @@ -189,7 +189,7 @@ msg_error_t MSG_task_cancel(msg_task_t task) if (simdata->compute) { simgrid::simix::simcall([simdata] { simdata->compute->cancel(); }); } else if (simdata->comm) { - simcall_comm_cancel(simdata->comm); + simgrid::simix::simcall([simdata] { simdata->comm->cancel(); }); } simdata->setNotUsed(); return MSG_OK; diff --git a/src/simix/libsmx.cpp b/src/simix/libsmx.cpp index 8bcf6626db..326c501e09 100644 --- a/src/simix/libsmx.cpp +++ b/src/simix/libsmx.cpp @@ -93,19 +93,6 @@ void simcall_process_suspend(smx_actor_t process) simcall_BODY_process_suspend(process); } -/** - * @ingroup simix_process_management - * @brief Set the user data of a #smx_actor_t. - * - * This functions sets the user data associated to @a process. - * @param process SIMIX process - * @param data User data - */ -void simcall_process_set_data(smx_actor_t process, void *data) -{ - simgrid::simix::simcall([process, data] { process->set_user_data(data); }); -} - /** * @ingroup simix_process_management * @brief Set the kill time of a process. @@ -235,18 +222,6 @@ smx_activity_t simcall_comm_iprobe(smx_mailbox_t mbox, int type, return simcall_BODY_comm_iprobe(mbox, type, match_fun, data); } -/** - * @ingroup simix_comm_management - */ -void simcall_comm_cancel(smx_activity_t synchro) -{ - simgrid::simix::simcall([synchro] { - simgrid::kernel::activity::CommImplPtr comm = - boost::static_pointer_cast(synchro); - comm->cancel(); - }); -} - /** * @ingroup simix_comm_management */ -- 2.20.1