From: mquinson Date: Sat, 27 Oct 2007 08:17:22 +0000 (+0000) Subject: Lastest cleanups in surf/ of Marc's jumbo commit X-Git-Tag: v3.3~906 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/27680c02b4e665650698b64e4da27bc1cbfc2752?ds=sidebyside Lastest cleanups in surf/ of Marc's jumbo commit git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4896 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/surf/cpu.c b/src/surf/cpu.c index 06bcaac948..c14f6cc36c 100644 --- a/src/surf/cpu.c +++ b/src/surf/cpu.c @@ -13,7 +13,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_cpu, surf, surf_cpu_model_t surf_cpu_model = NULL; lmm_system_t cpu_maxmin_system = NULL; -xbt_dict_t cpu_set; +xbt_dict_t cpu_set = NULL; static void cpu_free(void *cpu) { diff --git a/src/surf/network.c b/src/surf/network.c index 771ca0d9d8..531dbbbe58 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -188,13 +188,6 @@ static void parse_route_set_route(void) static void parse_file(const char *file) { int i; -/* - 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); -*/ /* Figuring out the network links */ surf_parse_reset_parser(); surfxml_add_callback(STag_surfxml_link_cb_list, &parse_link_init); diff --git a/src/surf/network_private.h b/src/surf/network_private.h index e6c50cc87f..cba58fbacc 100644 --- a/src/surf/network_private.h +++ b/src/surf/network_private.h @@ -14,6 +14,7 @@ typedef struct network_link_CM02 { surf_model_t model; /* Any such object, added in a trace should start by this field!!! */ + xbt_dict_t properties; /* Using this object with the public part of model does not make sense */ char *name; @@ -24,8 +25,6 @@ typedef struct network_link_CM02 { e_surf_link_state_t state_current; tmgr_trace_event_t state_event; lmm_constraint_t constraint; - /*holds the properties associated with a link*/ - xbt_dict_t properties; } s_link_CM02_t, *link_CM02_t; diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index fa7e68167f..31e3397cd4 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -39,13 +39,7 @@ xbt_dynar_t ETag_surfxml_prop_cb_list = NULL; static xbt_dynar_t surf_input_buffer_stack = NULL; static xbt_dynar_t surf_file_to_parse_stack = NULL; -void surfxml_call_cb_functions(xbt_dynar_t); - -void nil_function(void); -void nil_function(void) -{ - return; -} +static inline void surfxml_call_cb_functions(xbt_dynar_t); YY_BUFFER_STATE surf_input_buffer; FILE *surf_file_to_parse; @@ -292,7 +286,7 @@ void surfxml_add_callback(xbt_dynar_t cb_list, void_f_void_t function) xbt_dynar_push(cb_list, &function); } -void surfxml_call_cb_functions(xbt_dynar_t cb_list) +static inline void surfxml_call_cb_functions(xbt_dynar_t cb_list) { int iterator; void_f_void_t fun;