Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added all TCP VEGAS/RENO related functions. TODO: the diff functions in
[simgrid.git] / src / msg / global.c
index 9d4e7ec..db26236 100644 (file)
@@ -1,3 +1,4 @@
+
 /*     $Id$     */
 
 /* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved.        */
@@ -23,7 +24,10 @@ MSG_Global_t msg_global = NULL;
  *  \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 **************************************/
@@ -46,7 +50,6 @@ void MSG_global_init(int *argc, char **argv)
      
     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();
@@ -190,8 +193,10 @@ void MSG_paje_output(const char *filename)
 /** \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
@@ -423,7 +428,7 @@ MSG_error_t MSG_main(void)
   }
 
   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.");
@@ -482,7 +487,6 @@ MSG_error_t MSG_clean(void)
   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);
@@ -499,6 +503,7 @@ MSG_error_t MSG_clean(void)
   }
   msg_config_finalize();
   free(msg_global);
+  msg_global = NULL;
   surf_exit();
 
   return MSG_OK;