From: Frederic Suter Date: Fri, 5 Apr 2019 09:35:20 +0000 (+0200) Subject: get rid fo SIMIX_simcall_exit X-Git-Tag: v3.22.2~169 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2a7d4ad7f01f69f55791fe640630ef269a2f9770 get rid fo SIMIX_simcall_exit --- diff --git a/src/simix/popping.cpp b/src/simix/popping.cpp index c482ab8923..21a1331021 100644 --- a/src/simix/popping.cpp +++ b/src/simix/popping.cpp @@ -22,12 +22,6 @@ void SIMIX_simcall_answer(smx_simcall_t simcall) } } -void SIMIX_simcall_exit(smx_activity_t activity) -{ - if (activity != nullptr) // When migrating, the surf activity is disconnected from its simix activity before cancel - activity->post(); -} - void SIMIX_run_kernel(std::function const* code) { (*code)(); @@ -35,7 +29,7 @@ void SIMIX_run_kernel(std::function const* code) /** Kernel code for run_blocking * - * The implementtion looks a lot like SIMIX_run_kernel ^^ + * The implementation looks a lot like SIMIX_run_kernel ^^ * * However, this `run_blocking` is blocking so the process will not be woken * up until `SIMIX_simcall_answer(simcall)`` is called by the kernel. diff --git a/src/simix/popping_private.hpp b/src/simix/popping_private.hpp index b6a60d9669..be180ac81b 100644 --- a/src/simix/popping_private.hpp +++ b/src/simix/popping_private.hpp @@ -58,7 +58,6 @@ struct s_smx_simcall { XBT_PRIVATE void SIMIX_simcall_answer(smx_simcall_t simcall); XBT_PRIVATE void SIMIX_simcall_handle(smx_simcall_t simcall, int value); -XBT_PRIVATE void SIMIX_simcall_exit(smx_activity_t synchro); XBT_PRIVATE const char* SIMIX_simcall_name(e_smx_simcall_t kind); XBT_PRIVATE void SIMIX_run_kernel(std::function const* code); XBT_PRIVATE void SIMIX_run_blocking(std::function const* code); diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index bcca356024..d47121d289 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -313,7 +313,8 @@ static void SIMIX_wake_processes() XBT_DEBUG("Handling the processes whose action failed (if any)"); while ((action = model->extract_failed_action())) { XBT_DEBUG(" Handling Action %p",action); - SIMIX_simcall_exit(action->get_activity()); + if (action->get_activity() != nullptr) + simgrid::kernel::activity::ActivityImplPtr(action->get_activity())->post(); } XBT_DEBUG("Handling the processes whose action terminated normally (if any)"); while ((action = model->extract_done_action())) { @@ -321,7 +322,7 @@ static void SIMIX_wake_processes() if (action->get_activity() == nullptr) XBT_DEBUG("probably vcpu's action %p, skip", action); else - SIMIX_simcall_exit(action->get_activity()); + simgrid::kernel::activity::ActivityImplPtr(action->get_activity())->post(); } } }