/** Main function */
int main(int argc, char *argv[])
{
- MSG_global_init_args(&argc,argv);
+ MSG_global_init(&argc,argv);
if (argc < 3) {
printf ("Usage: %s platform_file deployment_file\n",argv[0]);
printf ("example: %s msg_platform.xml msg_deployment.xml\n",argv[0]);
} MSG_error_t;
/** @} */
-
-/** @deprecated MSG verbosity
- @ingroup m_datatypes_management
-*/
-typedef enum {
- MSG_SILENT = 0,
- MSG_SOME,
- MSG_VERBOSE
-} MSG_outputmode_t;
-
-
-/** @deprecated Network sharing mechanism
- @ingroup m_datatypes_management
- @brief Sharing policy : 0 means uninitialized value
-*/
-typedef enum {
- MSG_STORE_AND_FORWARD = 1, /**< Packet level simulation of communications. Bad */
- MSG_TCP /**< Continuous model of network communications. Good */
-} MSG_sharing_t;
-
-/** @deprecated Link datatype
- * @ingroup m_datatypes_management
- * The notion of <em>link</em> was present in the earliest versions of MSG.
- * It was an agglomeration of communicating resources representing a set of
- * physical network links. This abstraction a disappeared because in real-life,
- * it is generally not possible to interact directly with a link...
- */
-typedef struct m_link *m_link_t;
-
END_DECL()
#endif
/************************** Global ******************************************/
void MSG_config(const char *name, ...);
-void MSG_global_init(void);
+void MSG_global_init(int *argc, char **argv);
void MSG_global_init_args(int *argc, char **argv);
-void MSG_set_verbosity(MSG_outputmode_t mode);
MSG_error_t MSG_set_channel_number(int number);
-MSG_error_t MSG_set_sharing_policy(MSG_sharing_t mode, double param);
int MSG_get_channel_number(void);
MSG_error_t MSG_main(void);
MSG_error_t MSG_clean(void);
m_host_t host, int argc, char **argv);
void MSG_process_kill(m_process_t process);
int MSG_process_killall(int reset_PIDs);
-MSG_error_t MSG_get_arguments(int *argc, char ***argv);
-MSG_error_t MSG_set_arguments(m_process_t process,int argc, char *argv[]);
MSG_error_t MSG_process_change_host(m_process_t process, m_host_t host);
MSG_error_t MSG_process_resume(m_process_t process);
int MSG_process_is_suspended(m_process_t process);
-MSG_error_t MSG_process_start(m_process_t process);
-
/************************** Task handling ************************************/
m_task_t MSG_task_create(const char *name, double compute_duration,
double max_rate);
MSG_error_t MSG_task_execute(m_task_t task);
MSG_error_t MSG_parallel_task_execute(m_task_t task);
+void MSG_task_set_priority(m_task_t task, double priority);
int MSG_task_Iprobe(m_channel_t channel);
int MSG_task_probe_from(m_channel_t channel);
double MSG_task_get_remaining_computation(m_task_t task);
double MSG_task_get_data_size(m_task_t task);
-/************************** Deprecated ***************************************/
-/* MSG_error_t MSG_routing_table_init(void); */
-/* MSG_error_t MSG_routing_table_set(m_host_t host1, m_host_t host2, */
-/* m_link_t link); */
-/* m_link_t MSG_routing_table_get(m_host_t host1, m_host_t host2); */
-/* m_host_t MSG_host_create(const char *name, */
-/* char *trace_file, */
-/* long double fixed_cpu, */
-/* char* failure_trace, */
-/* long double fixed_failure, */
-/* void *data); */
-/* m_host_t MSG_host_from_PID(int PID); */
-/* MSG_error_t MSG_host_destroy(m_host_t host); */
-
-/* void MSG_link_set_sharing_value(long double alpha); */
-/* m_link_t MSG_link_create(const char *name, */
-/* char *lat_trace_file, long double fixed_latency, */
-/* char *bw_trace_file, long double fixed_bandwidth); */
-/* MSG_error_t MSG_link_destroy(m_link_t link); */
-/* m_link_t MSG_link_merge(const char *name, m_link_t src1, m_link_t src2); */
-/* m_link_t MSG_get_link_by_name(const char *name); */
-/* void MSG_tracelink(m_host_t dest, const char* **names, int *count); */
END_DECL()
#endif
*/
void MSG_function_register(const char *name,m_process_code_t code)
{
- xbt_assert0(msg_global,"MSG_global_init_args has to be called before MSG_function_register.");
+ xbt_assert0(msg_global,"MSG_global_init has to be called before MSG_function_register.");
xbt_dict_set(msg_global->registered_functions,name,code,NULL);
}
{
m_process_code_t code = NULL;
- xbt_assert0(msg_global,"MSG_global_init_args has to be called before MSG_get_registered_function.");
+ xbt_assert0(msg_global,"MSG_global_init has to be called before MSG_get_registered_function.");
code = xbt_dict_get(msg_global->registered_functions,name);
return code;
}
-/** \ingroup msg_easier_life
- * \brief Get the arguments of the current process.
- * \deprecated{Not useful since #m_process_code_t is int (*)(int argc, char *argv[])}
- *
- * This functions returns the values set for the current process
- * using #MSG_set_arguments or #MSG_launch_application.
- * \param argc the number of arguments
- * \param argv the arguments table
- */
-MSG_error_t MSG_get_arguments(int *argc, char ***argv)
-{
- m_process_t process = MSG_process_self();
- simdata_process_t simdata = NULL;
-
- xbt_assert0((argc) && (argv), "Invalid parameters");
- simdata = process->simdata;
- *argc = simdata->argc;
- *argv = simdata->argv;
-
- return MSG_OK;
-}
-
-/* \ingroup msg_easier_life
- * \brief Set the arguments of a process.
- *
- * This functions sets the argument number and the arguments table for a
- * proces.
- * \param process is the process you want to modify
- * \param argc the number of arguments
- * \param argv the arguments table
- */
-MSG_error_t MSG_set_arguments(m_process_t process,int argc, char *argv[])
-{
- xbt_assert0(0,"Deprecated ! Do not use anymore. "
- "Use MSG_process_create_with_arguments instead.\n");
-
- return MSG_OK;
-}
-
/** \ingroup msg_simulation
* \brief Initialize some MSG internal data.
*/
-void MSG_global_init(void)
+void MSG_global_init_args(int *argc, char **argv)
{
- int argc=0;
- char **argv=NULL;
-
- CRITICAL0("Function MSG_global_init() is deprecated by MSG_global_init_args().");
- MSG_global_init_args(&argc,argv);
+ MSG_global_init(argc,argv);
}
/** \ingroup msg_simulation
* \brief Initialize some MSG internal data.
*/
-void MSG_global_init_args(int *argc, char **argv)
+void MSG_global_init(int *argc, char **argv)
{
if (!msg_global) {
surf_init(argc, argv); /* Initialize some common structures. Warning, it sets msg_global=NULL */
}
}
-/** @deprecated Defines the verbosity of the simulation.
- * @ingroup msg_simulation
- */
-void MSG_set_verbosity(MSG_outputmode_t mode)
-{
- CRITICAL0("MSG_set_verbosity : Deprecated function. Use the XBT logging interface.");
-}
-
/** \defgroup m_channel_management Understanding channels
* \brief This section briefly describes the channel notion of MSG
* (#m_channel_t).
return MSG_OK;
}
-/** \ingroup m_simulation
- * \brief Set the sharing policy used for the links
- *
- * This function can be called to change the sharing policy used for the links
- (see \ref paper_tcp). By default the store and forward mechanism is used
- with a parameter equal to 0.1. This function has to be called before creating
- any link.
- * \param mode the sharing policy used for the links: can be either
- MSG_STORE_AND_FORWARD or MSG_TCP.
- * \param param a parameter for the sharing policy. It has to be >0. It is
- currently used only for the MSG_STORE_AND_FORWARD flavor and represents the
- granularity of the communications (i.e. the packet size).
- */
-MSG_error_t MSG_set_sharing_policy(MSG_sharing_t mode, double param)
-{
- CRITICAL0("MSG_set_sharing_policy: this function is now deprecated and useless. Store and forward does not exist anymore. Please stop using it.");
-
- return MSG_OK;
-}
-
/** \ingroup m_channel_management
* \brief Return the number of channel in the simulation.
*
fprintf(OUT, "%s", "int main (int argc,char *argv[]) {\n"
"\n"
" /* Simulation setup */\n"
- " MSG_global_init_args(&argc,argv);\n"
+ " MSG_global_init(&argc,argv);\n"
" if (argc != 3) {\n"
" fprintf(stderr, \"Usage: %s platform_file application_description.txt [--gras-log=...]\\n\",argv[0]);\n"
" exit(1);\n"