Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mv surf_parse -> surfxml_parse
[simgrid.git] / src / msg / msg_config.c
index f7cd094..30c330a 100644 (file)
 #include "xbt/sysdep.h"
 #include "xbt/log.h"
 
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_cfg, msg,
-                               "Configuration support in \ref MSG_API");
-
-
 int _msg_init_status = 0; /* 0: beginning of time; 
                              1: pre-inited (cfg_set created); 
                              2: inited (running) */
@@ -50,6 +46,15 @@ void msg_config_init(void) {
   xbt_cfg_set_string(_msg_cfg_set,"surf_workstation_model", "CLM03");
 }
 
+void msg_config_finalize(void) {
+
+  if (!_msg_init_status) 
+    return; /* Not initialized yet. Nothing to do */
+
+  xbt_cfg_free(&_msg_cfg_set);
+  _msg_init_status = 0;
+}
+
 /** \brief set a configuration variable
  * 
  * Currently existing configuation variable: