X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a7c708d3570410ce5a1316a54f9dda55d2bb46ca..5e7d79b763a5f55d1afb579d2b5a8d30ccfe869c:/src/simix/smx_global.cpp diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index f813a39ac7..f79169b16a 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -169,21 +169,16 @@ static void kill_process(smx_actor_t process) SIMIX_process_kill(process, nullptr); } -static std::function maestro_code; namespace simgrid { namespace simix { simgrid::xbt::signal onDeadlock; -XBT_PUBLIC void set_maestro(std::function code) -{ - maestro_code = std::move(code); -} - } } +static std::function maestro_code; void SIMIX_set_maestro(void (*code)(void*), void* data) { #ifdef _WIN32 @@ -195,9 +190,6 @@ void SIMIX_set_maestro(void (*code)(void*), void* data) /** * \ingroup SIMIX_API * \brief Initialize SIMIX internal data. - * - * \param argc Argc - * \param argv Argv */ void SIMIX_global_init(int *argc, char **argv) { @@ -220,7 +212,7 @@ void SIMIX_global_init(int *argc, char **argv) // Either create a new context with maestro or create // a context object with the current context mestro): - simgrid::simix::create_maestro(maestro_code); + simgrid::kernel::actor::create_maestro(maestro_code); /* Prepare to display some more info when dying on Ctrl-C pressing */ signal(SIGINT, inthandler); @@ -345,15 +337,15 @@ static void SIMIX_wake_processes() XBT_DEBUG("Handling the processes whose action failed (if any)"); while ((action = surf_model_extract_failed_action_set(model))) { XBT_DEBUG(" Handling Action %p",action); - SIMIX_simcall_exit(static_cast(action->getData())); + SIMIX_simcall_exit(static_cast(action->get_data())); } XBT_DEBUG("Handling the processes whose action terminated normally (if any)"); while ((action = surf_model_extract_done_action_set(model))) { XBT_DEBUG(" Handling Action %p",action); - if (action->getData() == nullptr) + if (action->get_data() == nullptr) XBT_DEBUG("probably vcpu's action %p, skip", action); else - SIMIX_simcall_exit(static_cast(action->getData())); + SIMIX_simcall_exit(static_cast(action->get_data())); } } }