Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
SD_simulate doesn't return a NULL-terminated array since a long time now
[simgrid.git] / src / simdag / sd_global.c
index 3f1ceb9..4a26829 100644 (file)
@@ -30,10 +30,6 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_kernel, sd,
 
 SD_global_t sd_global = NULL;
 
-XBT_LOG_EXTERNAL_CATEGORY(sd_kernel);
-XBT_LOG_EXTERNAL_CATEGORY(sd_task);
-XBT_LOG_EXTERNAL_CATEGORY(sd_workstation);
-
 /**
  * \brief Initialises SD internal data
  *
@@ -54,12 +50,6 @@ void SD_init(int *argc, char **argv)
 
   xbt_assert(sd_global == NULL, "SD_init() already called");
 
-  /* Connect our log channels: that must be done manually under windows */
-  XBT_LOG_CONNECT(sd_kernel, sd);
-  XBT_LOG_CONNECT(sd_task, sd);
-  XBT_LOG_CONNECT(sd_workstation, sd);
-
-
   sd_global = xbt_new(s_SD_global_t, 1);
   sd_global->workstation_list = NULL;
   sd_global->link_list = NULL;
@@ -214,7 +204,7 @@ void SD_create_environment(const char *platform_file)
  * Then you can call SD_simulate() again.
  *
  * \param how_long maximum duration of the simulation (a negative value means no time limit)
- * \return a NULL-terminated array of \ref SD_task_t whose state has changed.
+ * \return a dynar of \ref SD_task_t whose state has changed.
  * \see SD_task_schedule(), SD_task_watch()
  */
 
@@ -411,15 +401,16 @@ void SD_exit(void)
   xbt_swag_free(sd_global->failed_task_set);
   xbt_swag_free(sd_global->return_set);
 
+#ifdef HAVE_TRACING
+  TRACE_end();
+#endif
+
   XBT_DEBUG("Exiting Surf...");
   surf_exit();
 
   xbt_free(sd_global);
   sd_global = NULL;
 
-#ifdef HAVE_TRACING
-  TRACE_end();
-#endif
 #ifdef HAVE_JEDULE
   jedule_sd_dump();
   jedule_sd_cleanup();