Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
This commit concerned the reimplementation of the xbt context switch mechanism.
[simgrid.git] / src / surf / workstation_ptask_L07.c
index 2eb7dcb..ca617a9 100644 (file)
@@ -898,13 +898,14 @@ static void add_loopback(void)
     }
 }
 
-static void add_route()
+static void add_route(void)
 {
     xbt_ex_t e;
     int nb_link = 0;
     unsigned int cpt = 0;
     int link_list_capacity = 0;
     link_L07_t *link_list = NULL;
+       char* link;
 
     if (routing_table == NULL) create_routing_table();
 
@@ -914,7 +915,7 @@ static void add_route()
     link_list_capacity = xbt_dynar_length(links);
     link_list = xbt_new(link_L07_t, link_list_capacity);
 
-    char* link = NULL;
+    link = NULL;
     xbt_dynar_foreach (links, cpt, link) {
       TRY {
         link_list[nb_link++] = xbt_dict_get(link_set, link);
@@ -930,15 +931,15 @@ static void define_callbacks(const char *file)
 {
   /* Adding callback functions */
   surf_parse_reset_parser();
-  surfxml_add_callback(STag_surfxml_host_cb_list, &parse_cpu_init);
-  surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties);
-  surfxml_add_callback(STag_surfxml_link_cb_list, &parse_link_init);
-  surfxml_add_callback(STag_surfxml_route_cb_list, &parse_route_set_endpoints);
-  surfxml_add_callback(ETag_surfxml_link_c_ctn_cb_list, &parse_route_elem);
-  surfxml_add_callback(ETag_surfxml_route_cb_list, &parse_route_set_route);
-  surfxml_add_callback(STag_surfxml_platform_cb_list, &init_route_table);
-  surfxml_add_callback(ETag_surfxml_platform_cb_list, &add_route);
-  surfxml_add_callback(ETag_surfxml_platform_cb_list, &add_loopback);
+  surfxml_add_callback(STag_surfxml_host_cb_list, parse_cpu_init);
+  surfxml_add_callback(STag_surfxml_prop_cb_list, parse_properties);
+  surfxml_add_callback(STag_surfxml_link_cb_list, parse_link_init);
+  surfxml_add_callback(STag_surfxml_route_cb_list, parse_route_set_endpoints);
+  surfxml_add_callback(ETag_surfxml_link_c_ctn_cb_list, parse_route_elem);
+  surfxml_add_callback(ETag_surfxml_route_cb_list, parse_route_set_route);
+  surfxml_add_callback(STag_surfxml_platform_cb_list, init_route_table);
+  surfxml_add_callback(ETag_surfxml_platform_cb_list, add_route);
+  surfxml_add_callback(ETag_surfxml_platform_cb_list, add_loopback);
 }
 
 /**************************************/