+void SD_application_reinit(void)
+{
+
+ s_SD_task_t task;
+
+ if (SD_INITIALISED()) {
+ DEBUG0("Recreating the swags...");
+ xbt_swag_free(sd_global->not_scheduled_task_set);
+ xbt_swag_free(sd_global->scheduled_task_set);
+ xbt_swag_free(sd_global->ready_task_set);
+ xbt_swag_free(sd_global->in_fifo_task_set);
+ xbt_swag_free(sd_global->running_task_set);
+ xbt_swag_free(sd_global->done_task_set);
+ xbt_swag_free(sd_global->failed_task_set);
+
+ sd_global->not_scheduled_task_set =
+ xbt_swag_new(xbt_swag_offset(task, state_hookup));
+ sd_global->scheduled_task_set =
+ xbt_swag_new(xbt_swag_offset(task, state_hookup));
+ sd_global->ready_task_set =
+ xbt_swag_new(xbt_swag_offset(task, state_hookup));
+ sd_global->in_fifo_task_set =
+ xbt_swag_new(xbt_swag_offset(task, state_hookup));
+ sd_global->running_task_set =
+ xbt_swag_new(xbt_swag_offset(task, state_hookup));
+ sd_global->done_task_set =
+ xbt_swag_new(xbt_swag_offset(task, state_hookup));
+ sd_global->failed_task_set =
+ xbt_swag_new(xbt_swag_offset(task, state_hookup));
+ sd_global->task_number = 0;
+ } else {
+ WARN0("SD_application_reinit called before initialization of SimDag");
+ /* we cannot use exceptions here because xbt is not running! */
+ }
+
+}
+
+/**
+ * \brief Creates the environment
+ *
+ * The environment (i.e. the \ref SD_workstation_management "workstations" and the
+ * \ref SD_link_management "links") is created with the data stored in the given XML
+ * platform file.
+ *
+ * \param platform_file name of an XML file describing the environment to create
+ * \see SD_workstation_management, SD_link_management
+ *
+ * The XML file follows this DTD:
+ *
+ * \include simgrid.dtd
+ *
+ * Here is a small example of such a platform:
+ *
+ * \include small_platform.xml
+ */
+void SD_create_environment(const char *platform_file)
+{