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 */
}
xbt_dict_foreach(network_link_set, cursor, name, surf_link) {
- __SD_link_create(surf_link, name, NULL);
+ __SD_link_create(surf_link, NULL);
}
}
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 */
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 */
}
}