X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0bfafcab47ae9cd7856bd8d129404c33079d6afe..2fdfd29d8bd702dc10068f8f6ead958115a52e5a:/include/simgrid/engine.h diff --git a/include/simgrid/engine.h b/include/simgrid/engine.h index 1ffbe2771a..dda7f55165 100644 --- a/include/simgrid/engine.h +++ b/include/simgrid/engine.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018-2021. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2018-2022. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -29,8 +29,10 @@ XBT_PUBLIC void simgrid_load_platform(const char* filename); * \endrst */ XBT_PUBLIC void simgrid_load_deployment(const char* filename); -/** Run the simulation after initialization */ +/** Run the simulation until its end */ XBT_PUBLIC void simgrid_run(); +/** Run the simulation until the specified date */ +XBT_PUBLIC void simgrid_run_until(double max_date); /** Registers the main function of an actor that will be launched from the deployment file */ XBT_PUBLIC void simgrid_register_function(const char* name, void (*code)(int, char**)); /** Registers a function as the default main function of actors @@ -41,8 +43,11 @@ XBT_PUBLIC void simgrid_register_function(const char* name, void (*code)(int, ch XBT_PUBLIC void simgrid_register_default(void (*code)(int, char**)); /** Retrieve the simulation time (in seconds) */ XBT_PUBLIC double simgrid_get_clock(); -/** Retrieve the number of actors in the simulation */ -XBT_ATTRIB_DEPRECATED_v330("Please use sg_actor_count()") XBT_PUBLIC int simgrid_get_actor_count(); +/* 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); /** @brief Allow other libraries to react to the --help flag, too *