{
/* Specify which code should be executed by maestro on another thread, once this current thread is affected to an
* actor by the subsequent sg_actor_attach(). This must be done before the creation of the engine. */
- SIMIX_set_maestro(maestro, nullptr);
+ simgrid_set_maestro(maestro, nullptr);
simgrid::s4u::Engine e(&argc, argv);
XBT_PUBLIC void simgrid_register_default(void (*code)(int, char**));
/** Retrieve the simulation time (in seconds) */
XBT_PUBLIC double simgrid_get_clock();
+/* Set some code to execute in the maestro (must be used before the engine creation)
+ *
+ * If no maestro code is registered (the default), the main thread
+ * is assumed to be the maestro. */
+XBT_PUBLIC void simgrid_set_maestro(void (*code)(void*), void* data);
+
/** Retrieve the number of actors in the simulation */
XBT_ATTRIB_DEPRECATED_v330("Please use sg_actor_count()") XBT_PUBLIC int simgrid_get_actor_count();
*
* If no maestro code is registered (the default), the main thread
* is assumed to be the maestro. */
-XBT_PUBLIC void SIMIX_set_maestro(void (*code)(void*), void* data);
+XBT_ATTRIB_DEPRECATED_v333("Please use simgrid_set_maestro()") XBT_PUBLIC
+ void SIMIX_set_maestro(void (*code)(void*), void* data);
/* Simulation execution */
XBT_ATTRIB_DEPRECATED_v332("Please use EngineImpl:run()") XBT_PUBLIC void SIMIX_run();
return simgrid::s4u::Engine::get_instance()->get_actor_count();
}
-void SIMIX_set_maestro(void (*code)(void*), void* data)
+void simgrid_set_maestro(void (*code)(void*), void* data)
{
#ifdef _WIN32
XBT_INFO("WARNING, SIMIX_set_maestro is believed to not work on windows. Please help us investigating this issue if "
#endif
maestro_code = std::bind(code, data);
}
+void SIMIX_set_maestro(void (*code)(void*), void* data) // XBT_ATTRIB_DEPRECATED_v333
+{
+ simgrid_set_maestro(code, data);
+}