2 #include "msg_simix_private.h"
3 #include "xbt/sysdep.h"
7 /** \ingroup msg_easier_life
8 * \brief An application deployer.
10 * Creates the process described in \a file.
11 * \param file a filename of a xml description of the application. This file
14 * \include surfxml.dtd
16 * Here is a small example of such a platform
18 * \include small_deployment.xml
20 * Have a look in the directory examples/msg/ to have a bigger example.
22 void MSG_launch_application(const char *file)
25 xbt_assert0(msg_global,"MSG_global_init_args has to be called before MSG_launch_application.");
26 SIMIX_function_register_process_create(&__MSG_process_create_with_arguments);
27 SIMIX_function_register_process_kill(&MSG_process_kill);
28 SIMIX_launch_application(file);
33 /** \ingroup msg_easier_life
34 * \brief Registers a #m_process_code_t code in a global table.
36 * Registers a code function in a global table.
37 * This table is then used by #MSG_launch_application.
38 * \param name the reference name of the function.
39 * \param code the function
41 void MSG_function_register(const char *name,m_process_code_t code)
43 SIMIX_function_register(name, code);
47 /** \ingroup msg_easier_life
48 * \brief Registers a #m_process_t code in a global table.
50 * Registers a code function in a global table.
51 * This table is then used by #MSG_launch_application.
52 * \param name the reference name of the function.
54 m_process_code_t MSG_get_registered_function(const char *name)
56 m_process_code_t code = NULL;
58 code = (m_process_code_t)SIMIX_get_registered_function(name);