X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6721094a6e5bc535c446266801f713c9e99ac968..0cf6c791bd19e8b9acf8e220c5c62216c7fc2559:/src/kernel/EngineImpl.cpp diff --git a/src/kernel/EngineImpl.cpp b/src/kernel/EngineImpl.cpp index 6b2da71b62..a5b2d5718e 100644 --- a/src/kernel/EngineImpl.cpp +++ b/src/kernel/EngineImpl.cpp @@ -20,15 +20,15 @@ #include "src/simgrid/sg_config.hpp" #include "src/smpi/include/smpi_actor.hpp" +#if SIMGRID_HAVE_MC +#include "src/mc/remote/AppSide.hpp" +#endif + #include "xbt/log.hpp" #include #include -#if SIMGRID_HAVE_MC -#include "src/mc/remote/AppSide.hpp" -#endif - XBT_LOG_NEW_DEFAULT_CATEGORY(ker_engine, "Logging specific to Engine (kernel)"); namespace simgrid::kernel { @@ -175,22 +175,20 @@ void EngineImpl::initialize(int* argc, char** argv) // The communication initialization is done ASAP, as we need to get some init parameters from the MC for different // layers. But instance_ needs to be created, as we send the address of some of its fields to the MC that wants to // read them directly. - simgrid::mc::AppSide::initialize(); + simgrid::mc::AppSide::get(); // To ensure that it's initialized #endif - static bool inited = false; - if (not inited) { + if (static bool inited = false; not inited) { inited = true; xbt_log_init(argc, argv); simgrid::xbt::install_exception_handler(); - for (int i = 0; i < *argc; i++) - cmdline_.emplace_back(argv[i]); - sg_config_init(argc, argv); } + cmdline_.assign(argv, argv + *argc); + instance_->context_mod_init(); install_signal_handlers(); @@ -364,7 +362,7 @@ void EngineImpl::handle_ended_actions() const if (action->get_activity()->get_actor() == maestro_) action->get_activity()->get_iface()->complete(s4u::Activity::State::FAILED); - activity::ActivityImplPtr(action->get_activity())->post(); + activity::ActivityImplPtr(action->get_activity())->finish(); } } XBT_DEBUG("Handling the terminated actions (if any)"); @@ -377,7 +375,7 @@ void EngineImpl::handle_ended_actions() const if (action->get_activity()->get_actor() == maestro_) action->get_activity()->get_iface()->complete(s4u::Activity::State::FINISHED); - activity::ActivityImplPtr(action->get_activity())->post(); + activity::ActivityImplPtr(action->get_activity())->finish(); } } }