This avoid setting up these modules every time, which could cause some issues when mixing
/* Check the given arguments */
MSG_init(&argc, argv);
+ /* Explicit initialization of the action module is required now*/
+ MSG_action_init();
+
if (argc < 3) {
printf("Usage: %s platform_file deployment_file [action_files]\n", argv[0]);
printf
XBT_INFO("Simulation time %g", MSG_get_clock());
+ /* Explicit finalization of the action module is required now*/
+ MSG_action_exit();
+
if (res == MSG_OK)
return 0;
else
/************************** Action handling **********************************/
XBT_PUBLIC(msg_error_t) MSG_action_trace_run(char *path);
+XBT_PUBLIC(void) MSG_action_init(void);
+XBT_PUBLIC(void) MSG_action_exit(void);
#ifdef MSG_USE_DEPRECATED
"MSG actions for trace driven simulation");
-void _MSG_action_init()
+void MSG_action_init()
{
_xbt_replay_action_init();
MSG_function_register_default(xbt_replay_action_runner);
}
-void _MSG_action_exit()
+void MSG_action_exit()
{
_xbt_replay_action_exit();
}
msg_global->task_copy_callback = NULL;
msg_global->process_data_cleanup = NULL;
- /* initialization of the action module */
- _MSG_action_init();
-
SIMIX_function_register_process_create(MSG_process_create_from_SIMIX);
SIMIX_function_register_process_cleanup(MSG_process_cleanup_from_SIMIX);
#ifdef HAVE_TRACING
TRACE_surf_resource_utilization_release();
-#endif
-
- /* initialization of the action module */
- _MSG_action_exit();
-
-#ifdef HAVE_TRACING
TRACE_end();
#endif
smx_process_t parent_process);
void MSG_comm_copy_data_from_SIMIX(smx_action_t comm, void* buff, size_t buff_size);
-void _MSG_action_init(void);
-void _MSG_action_exit(void);
-
void MSG_post_create_environment(void);
static inline void *msg_host_resource_priv(const void *host) {