From: Martin Quinson Date: Thu, 10 Nov 2011 20:30:43 +0000 (+0100) Subject: cosmetics, nothing serious X-Git-Tag: exp_20120216~325^2~5 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e4c62e10ed7daa5ecca2506d38979c2adc3f7d23 cosmetics, nothing serious --- diff --git a/src/surf/surf_routing_dijkstra.c b/src/surf/surf_routing_dijkstra.c index 33cf01bada..31e59e359e 100644 --- a/src/surf/surf_routing_dijkstra.c +++ b/src/surf/surf_routing_dijkstra.c @@ -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; diff --git a/src/surf/surf_routing_floyd.c b/src/surf/surf_routing_floyd.c index 23bb9c4fa7..87d2bfa327 100644 --- a/src/surf/surf_routing_floyd.c +++ b/src/surf/surf_routing_floyd.c @@ -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; diff --git a/src/surf/surf_routing_full.c b/src/surf/surf_routing_full.c index 2bd5b2dced..74e7c26553 100644 --- a/src/surf/surf_routing_full.c +++ b/src/surf/surf_routing_full.c @@ -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; diff --git a/src/surf/surf_routing_generic.c b/src/surf/surf_routing_generic.c index a6501cb401..406f77190a 100644 --- a/src/surf/surf_routing_generic.c +++ b/src/surf/surf_routing_generic.c @@ -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; diff --git a/src/surf/surf_routing_private.h b/src/surf/surf_routing_private.h index 7e7405a747..f4bca9c67f 100644 --- a/src/surf/surf_routing_private.h +++ b/src/surf/surf_routing_private.h @@ -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 @@ -19,17 +18,19 @@ #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 */ diff --git a/src/surf/surf_routing_rulebased.c b/src/surf/surf_routing_rulebased.c index 9fad2dcfe3..5ae26c08b2 100644 --- a/src/surf/surf_routing_rulebased.c +++ b/src/surf/surf_routing_rulebased.c @@ -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;