+
/* $Id$ */
/* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */
* \brief This section describes the functions you need to know to
* set up a simulation. You should have a look at \ref MSG_examples
* to have an overview of their usage.
- * \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Simulation functions" --> \endhtmlonly
+ */
+
+/** \addtogroup msg_simulation
+ * \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Simulation functions" --> \endhtmlonly
*/
/********************************* MSG **************************************/
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();
/** \defgroup m_channel_management Understanding channels
* \brief This section briefly describes the channel notion of MSG
* (#m_channel_t).
- * \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Channels" --> \endhtmlonly
- *
+ */
+
+/** \addtogroup m_channel_management
+ * \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Channels" --> \endhtmlonly
*
* For convenience, the simulator provides the notion of channel
* that is close to the tag notion in MPI. A channel is not a
/* 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;