msg_global = xbt_new0(s_MSG_Global_t,1);
- xbt_context_init();
msg_global->host = xbt_fifo_new();
msg_global->process_to_run = xbt_fifo_new();
msg_global->process_list = xbt_fifo_new();
/* FIXME: Yeah, I'll do it in a portable maner one day [Mt] */
#include <signal.h>
-static void inthandler(int ignored)
+static void _XBT_CALL inthandler(int ignored)
{
INFO0("CTRL-C pressed. Displaying status and bailing out");
__MSG_display_process_status();
}
if (xbt_fifo_size(msg_global->process_list) == 0) {
- INFO0("Congratulations ! Simulation terminated : all processes are over");
+/* INFO0("Congratulations ! Simulation terminated : all processes are over"); */
return MSG_OK;
} else {
INFO0("Oops ! Deadlock or code not perfectly clean.");
while((p=xbt_fifo_pop(msg_global->process_list))) {
MSG_process_kill(p);
}
- xbt_context_exit();
xbt_fifo_foreach(msg_global->host,i,h,m_host_t) {
__MSG_host_destroy(h);
}
msg_config_finalize();
free(msg_global);
+ msg_global = NULL;
surf_exit();
return MSG_OK;