Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
no need to have the routing_parse_Scluster() function public. routing_register_callba...
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 8 Nov 2011 21:24:17 +0000 (22:24 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Tue, 8 Nov 2011 21:43:40 +0000 (22:43 +0100)
src/surf/surf_private.h
src/surf/surf_routing.c

index 2534167..9944f6f 100644 (file)
@@ -199,8 +199,6 @@ struct s_routing_global {
 XBT_PUBLIC(void) routing_model_create(size_t size_of_link, void *loopback, double_f_cpvoid_t get_link_latency_fun);
 XBT_PUBLIC(void) routing_register_callbacks(void);
 
 XBT_PUBLIC(void) routing_model_create(size_t size_of_link, void *loopback, double_f_cpvoid_t get_link_latency_fun);
 XBT_PUBLIC(void) routing_register_callbacks(void);
 
-XBT_PUBLIC(void) routing_parse_Scluster(void);       /* cluster bypass */
-
 /**
  * Resource protected methods
  */
 /**
  * Resource protected methods
  */
index eaf46a2..fdd0233 100644 (file)
@@ -837,38 +837,6 @@ void routing_model_create(size_t size_of_links, void *loopback, double_f_cpvoid_
   current_routing = NULL;
 }
 
   current_routing = NULL;
 }
 
-void routing_register_callbacks() {
-  sg_platf_host_add_cb(parse_S_host);
-  sg_platf_router_add_cb(parse_S_router);
-
-  surfxml_add_callback(STag_surfxml_random_cb_list, &routing_parse_Srandom);
-
-  surfxml_add_callback(STag_surfxml_route_cb_list,
-      &parse_S_route_new_and_endpoints_XML);
-  surfxml_add_callback(STag_surfxml_ASroute_cb_list,
-      &parse_S_ASroute_new_and_endpoints);
-  surfxml_add_callback(STag_surfxml_bypassRoute_cb_list,
-      &parse_S_bypassRoute_new_and_endpoints);
-
-  surfxml_add_callback(ETag_surfxml_link_ctn_cb_list, &routing_parse_link_ctn);
-
-  surfxml_add_callback(ETag_surfxml_route_cb_list,
-      &parse_E_route_store_route);
-  surfxml_add_callback(ETag_surfxml_ASroute_cb_list,
-      &parse_E_ASroute_store_route);
-  surfxml_add_callback(ETag_surfxml_bypassRoute_cb_list,
-      &parse_E_bypassRoute_store_route);
-
-  surfxml_add_callback(STag_surfxml_cluster_cb_list,
-      &routing_parse_Scluster);
-
-  sg_platf_peer_add_cb(routing_parse_Speer); // FIXME: inline in the sg_platf_new_peer instead
-  sg_platf_postparse_add_cb(clean_routing_after_parse);
-
-#ifdef HAVE_TRACING
-  instr_routing_define_callbacks();
-#endif
-}
 
 /* ************************************************** */
 /* ********** PATERN FOR NEW ROUTING **************** */
 
 /* ************************************************** */
 /* ********** PATERN FOR NEW ROUTING **************** */
@@ -1331,7 +1299,7 @@ void generic_src_dst_check(routing_component_t rc, const char *src,
         src,dst,src_as->name, dst_as->name,rc->name);
 }
 
         src,dst,src_as->name, dst_as->name,rc->name);
 }
 
-void routing_parse_Scluster(void) {
+static void routing_parse_cluster(void) {
   char *host_id, *groups, *link_id = NULL;
 
   s_sg_platf_host_cbarg_t host;
   char *host_id, *groups, *link_id = NULL;
 
   s_sg_platf_host_cbarg_t host;
@@ -1854,3 +1822,36 @@ static void routing_parse_Srandom(void)
     xbt_dynar_free(&radical_elements);
   }
 }
     xbt_dynar_free(&radical_elements);
   }
 }
+
+void routing_register_callbacks() {
+  sg_platf_host_add_cb(parse_S_host);
+  sg_platf_router_add_cb(parse_S_router);
+
+  surfxml_add_callback(STag_surfxml_random_cb_list, &routing_parse_Srandom);
+
+  surfxml_add_callback(STag_surfxml_route_cb_list,
+      &parse_S_route_new_and_endpoints_XML);
+  surfxml_add_callback(STag_surfxml_ASroute_cb_list,
+      &parse_S_ASroute_new_and_endpoints);
+  surfxml_add_callback(STag_surfxml_bypassRoute_cb_list,
+      &parse_S_bypassRoute_new_and_endpoints);
+
+  surfxml_add_callback(ETag_surfxml_link_ctn_cb_list, &routing_parse_link_ctn);
+
+  surfxml_add_callback(ETag_surfxml_route_cb_list,
+      &parse_E_route_store_route);
+  surfxml_add_callback(ETag_surfxml_ASroute_cb_list,
+      &parse_E_ASroute_store_route);
+  surfxml_add_callback(ETag_surfxml_bypassRoute_cb_list,
+      &parse_E_bypassRoute_store_route);
+
+  surfxml_add_callback(STag_surfxml_cluster_cb_list,
+      &routing_parse_cluster);
+
+  sg_platf_peer_add_cb(routing_parse_Speer); // FIXME: inline in the sg_platf_new_peer instead
+  sg_platf_postparse_add_cb(clean_routing_after_parse);
+
+#ifdef HAVE_TRACING
+  instr_routing_define_callbacks();
+#endif
+}