Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics, nothing serious
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 10 Nov 2011 20:30:43 +0000 (21:30 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 10 Nov 2011 20:30:43 +0000 (21:30 +0100)
src/surf/surf_routing_dijkstra.c
src/surf/surf_routing_floyd.c
src/surf/surf_routing_full.c
src/surf/surf_routing_generic.c
src/surf/surf_routing_private.h
src/surf/surf_routing_rulebased.c

index 33cf01b..31e59e3 100644 (file)
@@ -437,7 +437,7 @@ static void dijkstra_finalize(AS_t asg)
 AS_t model_dijkstra_both_create(int cached)
 {
   as_dijkstra_t new_component = (as_dijkstra_t)
-      routmod_generic_create(sizeof(s_as_dijkstra_t));
+      model_generic_create_sized(sizeof(s_as_dijkstra_t));
 
   new_component->generic_routing.parse_route = model_dijkstra_both_parse_route;
   new_component->generic_routing.parse_ASroute = model_dijkstra_both_parse_route;
index 23bb9c4..87d2bfa 100644 (file)
@@ -171,7 +171,7 @@ static void floyd_finalize(AS_t rc)
 
 AS_t model_floyd_create(void)
 {
-  as_floyd_t new_component = (as_floyd_t)routmod_generic_create(sizeof(s_as_floyd_t));
+  as_floyd_t new_component = (as_floyd_t)model_generic_create_sized(sizeof(s_as_floyd_t));
   new_component->generic_routing.parse_route = model_floyd_parse_route;
   new_component->generic_routing.parse_ASroute = model_floyd_parse_route;
   new_component->generic_routing.get_route = floyd_get_route;
index 2bd5b2d..74e7c26 100644 (file)
@@ -125,7 +125,7 @@ static void full_finalize(AS_t rc)
 AS_t model_full_create(void)
 {
   routing_component_full_t new_component = (routing_component_full_t)
-      routmod_generic_create(sizeof(s_routing_component_full_t));
+      model_generic_create_sized(sizeof(s_routing_component_full_t));
 
   new_component->generic_routing.parse_route = model_full_set_route;
   new_component->generic_routing.parse_ASroute = model_full_set_route;
index a6501cb..406f771 100644 (file)
@@ -14,7 +14,7 @@
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_routing_generic, surf_route, "Generic implementation of the surf routing");
 
-AS_t routmod_generic_create(size_t childsize) {
+AS_t model_generic_create_sized(size_t childsize) {
   AS_t new_component = xbt_malloc0(childsize);
 
   new_component->parse_PU = generic_parse_PU;
index 7e7405a..f4bca9c 100644 (file)
@@ -1,9 +1,8 @@
-/*
- * surf_routing_private.h
- *
- *  Created on: 14 avr. 2011
- *      Author: navarrop
- */
+/* Copyright (c) 2009, 2010, 2011. The SimGrid Team.
+ * All rights reserved.                                                     */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #ifndef _SURF_SURF_ROUTING_PRIVATE_H
 #define _SURF_SURF_ROUTING_PRIVATE_H
 #include "xbt/set.h"
 #include "surf/surfxml_parse.h"
 
+/* ************************************************************************** */
+/* ******************************* NO ROUTING ******************************* */
+/* Only save the AS tree, and forward calls to child ASes */
+AS_t model_none_create(void);
+
 /* ************************************************************************** */
 /* ***************** GENERIC PARSE FUNCTIONS (declarations) ***************** */
-AS_t routmod_generic_create(size_t childsize);
+AS_t model_generic_create_sized(size_t childsize);
 
-void generic_parse_PU(AS_t rc,
-                                        const char *name);
-void generic_parse_AS(AS_t rc,
-                                          const char *name);
-void generic_parse_bypassroute(AS_t rc,
-                                    const char *src, const char *dst,
-                                    route_extended_t e_route);
+void generic_parse_PU(AS_t rc, const char *name);
+void generic_parse_AS(AS_t rc, const char *name);
+void generic_parse_bypassroute(AS_t rc, const char *src, const char *dst,
+                               route_extended_t e_route);
 
 /* ************************************************************************** */
 /* *************** GENERIC BUSINESS METHODS (declarations) ****************** */
@@ -101,8 +102,5 @@ void model_full_end(AS_t as);       /* finalize the creation of full routing mod
 void model_full_set_route(     /* Set the route and ASroute between src and dst */
                AS_t rc, const char *src, const char *dst, route_extended_t route);
 
-/* ************************************************************************** */
-/* ******************************* NO ROUTING ******************************* */
-AS_t model_none_create(void);           /* none routing model */
 
 #endif                          /* _SURF_SURF_ROUTING_PRIVATE_H */
index 9fad2dc..5ae26c0 100644 (file)
@@ -395,7 +395,7 @@ static void rulebased_finalize(AS_t rc)
 AS_t model_rulebased_create(void) {
 
   routing_component_rulebased_t new_component = (routing_component_rulebased_t)
-      routmod_generic_create(sizeof(s_routing_component_rulebased_t));
+      model_generic_create_sized(sizeof(s_routing_component_rulebased_t));
 
   new_component->generic_routing.parse_PU = model_rulebased_parse_PU;
   new_component->generic_routing.parse_AS = model_rulebased_parse_AS;