Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove unused parameter.
[simgrid.git] / src / msg / msg_deployment.cpp
1 /* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved.          */
2
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. */
5
6 #include "src/msg/msg_private.hpp"
7
8 extern "C" {
9
10 /** \ingroup msg_simulation
11  * \brief An application deployer.
12  *
13  * Creates the process described in \a file.
14  * \param file a filename of a xml description of the application. This file follows this DTD :
15  *
16  *     \include simgrid.dtd
17  *
18  * Here is a small example of such a platform
19  *
20  *     \include msg/masterslave/deployment_masterslave.xml
21  *
22  * Have a look in the directory examples/msg/ to have a bigger example.
23  */
24 void MSG_launch_application(const char *file)
25 {
26   xbt_assert(msg_global, "MSG_init has to be called before MSG_launch_application.");
27   SIMIX_launch_application(file);
28 }
29
30 /** \ingroup msg_simulation
31  * \brief Registers the main function of a process in a global table.
32  *
33  * Registers a code function in a global table.
34  * This table is then used by #MSG_launch_application.
35  * \param name the reference name of the function.
36  * \param code the function (must have the same prototype than the main function of any C program: int ..(int argc, char *argv[]))
37  */
38 void MSG_function_register(const char *name, xbt_main_func_t code)
39 {
40   SIMIX_function_register(name, code);
41 }
42
43 /** \ingroup msg_simulation
44  * \brief Registers a function as the default main function of processes.
45  *
46  * Registers a code function as being the default value. This function will get used by MSG_launch_application() when there is no registered function of the requested name in.
47  * \param code the function (must have the same prototype than the main function of any C program: int ..(int argc, char *argv[]))
48  */
49 void MSG_function_register_default(xbt_main_func_t code)
50 {
51   SIMIX_function_register_default(code);
52 }
53
54 /**
55  * \brief register functions bypassing the parser
56  */
57
58 void MSG_set_function(const char *host_id, const char *function_name, xbt_dynar_t arguments)
59 {
60   SIMIX_process_set_function(host_id, function_name, arguments, -1, -1);
61 }
62 }