]> AND Public Git Repository - simgrid.git/blobdiff - src/simdag/sd_global.c
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement SD_task_schedule, SD_task_unschedule and other SimDag stuff.
[simgrid.git] / src / simdag / sd_global.c
index 52c35d53953ec3570c5c58bd829c843aa0c6cc15..9e8c7143a1b217c2eff93d00c2c1667343cb3a73 100644 (file)
@@ -28,7 +28,7 @@ void SD_create_environment(const char *platform_file) {
   void *surf_workstation = NULL;
   void *surf_link = NULL;
 
-  CHECK_INIT_DONE();
+  SD_CHECK_INIT_DONE();
 
   surf_timer_resource_init(platform_file);  /* tell Surf to create the environnement */
 
@@ -49,7 +49,7 @@ void SD_create_environment(const char *platform_file) {
   }
 
   xbt_dict_foreach(network_link_set, cursor, name, surf_link) {
-    __SD_link_create(surf_link, name, NULL);
+    __SD_link_create(surf_link, NULL);
   }
 }
 
@@ -77,7 +77,7 @@ SD_task_t* SD_simulate(double how_long)
   xbt_dict_foreach(sd_global->links, cursor, name, link) {
     bandwidth = SD_link_get_current_bandwidth(link);
     latency = SD_link_get_current_latency(link);
-    printf("Link name: %s, bandwidth: %f, latency; %f\n", name, bandwidth, latency);
+    printf("Link name: %s, bandwidth: %f, latency: %f\n", name, bandwidth, latency);
   }
 
   /* test the route between two workstations */
@@ -101,14 +101,14 @@ SD_task_t* SD_simulate(double how_long)
   return NULL;
 }
 
-/* Destroys all SD data. This function should be called when the simulation is over.
+/* Destroys all SD internal data. This function should be called when the simulation is over.
+ * The tasks should have been destroyed first.
  */
-void SD_clean() {
+void SD_exit() {
   if (sd_global != NULL) {
     xbt_dict_free(&sd_global->workstations);
     xbt_dict_free(&sd_global->links);
     xbt_free(sd_global);
     surf_exit();
-    /* TODO: destroy the tasks */
   }
 }