X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/16f1630ae434e729cbe0b24fe2f19c8f67f774cd..4b0fa756ae6e58a74c374a519389ecb9e8b6a4d9:/include/simgrid/engine.h diff --git a/include/simgrid/engine.h b/include/simgrid/engine.h index 4a2247eec8..66e74f561d 100644 --- a/include/simgrid/engine.h +++ b/include/simgrid/engine.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2018-2019. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2018-2020. 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. */ @@ -7,21 +7,24 @@ #define INCLUDE_SIMGRID_ENGINE_H_ #include +#include SG_BEGIN_DECL /* C interface */ -/** Initialize the SimGrid engine, taking the command line parameters of your main function. */ -XBT_PUBLIC void simgrid_init(int* argc, char** argv); + + /** Initialize the SimGrid engine, taking the command line parameters of your main function. */ + XBT_PUBLIC void + simgrid_init(int* argc, char** argv); /** Creates a new platform, including hosts, links, and the routing table. * - * \rst + * \beginrst * See also: :ref:`platform`. * \endrst */ XBT_PUBLIC void simgrid_load_platform(const char* filename); /** Load a deployment file and launch the actors that it contains * - * \rst + * \beginrst * See also: :ref:`deploy`. * \endrst */ @@ -29,17 +32,17 @@ XBT_PUBLIC void simgrid_load_deployment(const char* filename); /** Run the simulation after initialization */ XBT_PUBLIC void simgrid_run(); /** Registers the main function of an actor that will be launched from the deployment file */ -XBT_PUBLIC void simgrid_register_function(const char* name, int (*code)(int, char**)); +XBT_PUBLIC void simgrid_register_function(const char* name, void (*code)(int, char**)); /** Registers a function as the default main function of actors * * It will be used as fallback when the function requested from the deployment file was not registered. * It is used for trace-based simulations (see examples/s4u/replay-comms and similar). */ -XBT_PUBLIC void simgrid_register_default(int (*code)(int, char**)); +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_PUBLIC int simgrid_get_actor_count(); +XBT_ATTRIB_DEPRECATED_v330("Please use sg_actor_count()") XBT_PUBLIC int simgrid_get_actor_count(); /** @brief Allow other libraries to react to the --help flag, too *