1 /* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #include "simgrid/kernel/Timer.hpp"
8 #include "simgrid/s4u/Engine.hpp"
9 #include "simgrid/s4u/Host.hpp"
10 #include "src/smpi/include/smpi_actor.hpp"
12 #include "simgrid/sg_config.hpp"
13 #include "src/kernel/EngineImpl.hpp"
14 #include "src/mc/mc_record.hpp"
15 #include "src/mc/mc_replay.hpp"
16 #include "src/surf/xml/platf.hpp"
18 #include "simgrid/kernel/resource/Model.hpp"
22 XBT_LOG_NEW_CATEGORY(simix, "All SIMIX categories");
23 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_kernel, simix, "Logging specific to SIMIX (kernel)");
28 xbt_dynar_t simix_global_get_actors_addr()
31 return kernel::EngineImpl::get_instance()->get_actors_vector();
33 xbt_die("This function is intended to be used when compiling with MC");
36 xbt_dynar_t simix_global_get_dead_actors_addr()
39 return kernel::EngineImpl::get_instance()->get_dead_actors_vector();
41 xbt_die("This function is intended to be used when compiling with MC");
46 } // namespace simgrid
50 * @brief A clock (in second).
52 * @return Return the clock.
54 double SIMIX_get_clock() // XBT_ATTRIB_DEPRECATED_v332
56 return simgrid::s4u::Engine::get_clock();
59 void SIMIX_run() // XBT_ATTRIB_DEPRECATED_v332
61 simgrid::kernel::EngineImpl::get_instance()->run();
64 int SIMIX_is_maestro()
66 const simgrid::kernel::actor::ActorImpl* self = SIMIX_process_self();
67 return self == nullptr || simgrid::kernel::EngineImpl::get_instance()->is_maestro(self);