Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
372f0bf7eec5a955f61de41bdd572e86b450c94b
[simgrid.git] / src / msg_simix / deployment.c
1
2 #include "private.h"
3 #include "xbt/sysdep.h"
4 #include "xbt/log.h"
5
6
7 /** \ingroup msg_easier_life
8  * \brief An application deployer.
9  *
10  * Creates the process described in \a file.
11  * \param file a filename of a xml description of the application. This file 
12  * follows this DTD :
13  *
14  *     \include surfxml.dtd
15  *
16  * Here is a small example of such a platform 
17  *
18  *     \include small_deployment.xml
19  *
20  * Have a look in the directory examples/msg/ to have a bigger example.
21  */
22 void MSG_launch_application(const char *file) 
23 {
24   xbt_assert0(msg_global,"MSG_global_init_args has to be called before MSG_launch_application.");
25         SIMIX_launch_application(file);
26
27         return;
28 }
29
30 /** \ingroup msg_easier_life
31  * \brief Registers a #m_process_code_t code 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
37  */
38 void MSG_function_register(const char *name,m_process_code_t code)
39 {
40         SIMIX_function_register(name, code);
41         return;
42 }
43
44 /** \ingroup msg_easier_life
45  * \brief Registers a #m_process_t code in a global table.
46  *
47  * Registers a code function in a global table. 
48  * This table is then used by #MSG_launch_application. 
49  * \param name the reference name of the function.
50  */
51 m_process_code_t MSG_get_registered_function(const char *name)
52 {
53   m_process_code_t code = NULL;
54
55         code = (m_process_code_t)SIMIX_get_registered_function(name);
56
57   return code;
58 }
59