X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d2ba533b2ba779dc85b3faf0d297dc6f13c7e7c1..b8ba0bc2f48c6b9b96dfedd8fd383b941d5fdd0b:/src/msg/msg_global.c diff --git a/src/msg/msg_global.c b/src/msg/msg_global.c index 7ac93dd4f9..7b0c29e6ac 100644 --- a/src/msg/msg_global.c +++ b/src/msg/msg_global.c @@ -67,6 +67,8 @@ void MSG_global_init(int *argc, char **argv) msg_global->max_channel = 0; msg_global->PID = 1; msg_global->sent_msg = 0; + msg_global->task_copy_callback = NULL; + msg_global->process_data_cleanup = NULL; /* initialization of the action module */ _MSG_action_init(); @@ -110,6 +112,7 @@ void MSG_global_init(int *argc, char **argv) */ MSG_error_t MSG_set_channel_number(int number) { + XBT_WARN("DEPRECATED! Now use alias"); xbt_assert((msg_global) && (msg_global->max_channel == 0), "Channel number already set!"); @@ -128,6 +131,7 @@ MSG_error_t MSG_set_channel_number(int number) */ int MSG_get_channel_number(void) { + XBT_WARN("DEPRECATED! Now use alias"); xbt_assert((msg_global) && (msg_global->max_channel != 0), "Channel number not set yet!"); @@ -153,6 +157,37 @@ MSG_error_t MSG_main(void) return MSG_OK; } +MSG_error_t MSG_main_stateful(void) +{ + /* Clean IO before the run */ + fflush(stdout); + fflush(stderr); + + if (MC_IS_ENABLED) { + MC_modelcheck_stateful(); + } + else { + SIMIX_run(); + } + return MSG_OK; +} + + +MSG_error_t MSG_main_liveness(xbt_automaton_t a, char *prgm) +{ + /* Clean IO before the run */ + fflush(stdout); + fflush(stderr); + + if (MC_IS_ENABLED) { + MC_modelcheck_liveness(a, prgm); + } + else { + SIMIX_run(); + } + return MSG_OK; +} + /** \ingroup msg_simulation * \brief Kill all running process @@ -162,7 +197,7 @@ MSG_error_t MSG_main(void) */ int MSG_process_killall(int reset_PIDs) { - SIMIX_req_process_killall(); + simcall_process_killall(); if (reset_PIDs > 0) { msg_global->PID = reset_PIDs;