+
/* $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();
void MSG_paje_output(const char *filename)
{
int i;
- const char *paje_preembule="%EventDef SetLimits 0\n"
- "% StartTime date\n"
- "% EndTime date\n"
- "%EndEventDef\n"
+ const char *paje_preembule=
"%EventDef PajeDefineContainerType 1\n"
"% NewType string\n"
"% ContainerType string\n"
"% NewName string\n"
"%EndEventDef\n"
- "%EventDef PajeDefineEventType 2\n"
- "% NewType string\n"
- "% ContainerType string\n"
- "% NewName string\n"
- "%EndEventDef\n"
"%EventDef PajeDefineStateType 3\n"
"% NewType string\n"
"% ContainerType string\n"
"% NewName string\n"
"%EndEventDef\n"
- "%EventDef PajeDefineVariableType 4\n"
- "% NewType string\n"
- "% ContainerType string\n"
- "% NewName string\n"
- "%EndEventDef\n"
"%EventDef PajeDefineLinkType 5\n"
"% NewType string\n"
"% ContainerType string\n"
"% Name string\n"
"% Type string\n"
"%EndEventDef\n"
- "%EventDef PajeNewEvent 9\n"
- "% Time date\n"
- "% EntityType string\n"
- "% Container string\n"
- "% Value string\n"
- "%EndEventDef\n"
"%EventDef PajeSetState 10\n"
"% Time date\n"
"% EntityType string\n"
"% Container string\n"
"% Value string\n"
"%EndEventDef\n"
- "%EventDef PajeSetState 101\n"
- "% Time date\n"
- "% EntityType string\n"
- "% Container string\n"
- "% Value string\n"
- "% FileName string\n"
- "% LineNumber int\n"
- "%EndEventDef\n"
- "%EventDef PajePushState 111\n"
- "% Time date\n"
- "% EntityType string\n"
- "% Container string\n"
- "% Value string\n"
- "% FileName string\n"
- "% LineNumber int\n"
- "%EndEventDef\n"
"%EventDef PajePushState 11\n"
"% Time date\n"
"% EntityType string\n"
"% EntityType string\n"
"% Container string\n"
"%EndEventDef\n"
- "%EventDef PajeSetVariable 13\n"
- "% Time date\n"
- "% EntityType string\n"
- "% Container string\n"
- "% Value double\n"
- "%EndEventDef\n"
- "%EventDef PajeAddVariable 14\n"
- "% Time date\n"
- "% EntityType string\n"
- "% Container string\n"
- "% Value double\n"
- "%EndEventDef\n"
- "%EventDef PajeSubVariable 15\n"
- "% Time date\n"
- "% EntityType string\n"
- "% Container string\n"
- "% Value double\n"
- "%EndEventDef\n"
"%EventDef PajeStartLink 16\n"
"% Time date\n"
"% EntityType string\n"
/** \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;