Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Lastest cleanups in surf/ of Marc's jumbo commit
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 27 Oct 2007 08:17:22 +0000 (08:17 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Sat, 27 Oct 2007 08:17:22 +0000 (08:17 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4896 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/surf/cpu.c
src/surf/network.c
src/surf/network_private.h
src/surf/surfxml_parse.c

index 06bcaac..c14f6cc 100644 (file)
@@ -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;
 
 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)
 {
 
 static void cpu_free(void *cpu)
 {
index 771ca0d..531dbbb 100644 (file)
@@ -188,13 +188,6 @@ static void parse_route_set_route(void)
 static void parse_file(const char *file)
 {
   int i;
 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);
   /* Figuring out the network links */
   surf_parse_reset_parser();
   surfxml_add_callback(STag_surfxml_link_cb_list, &parse_link_init);
index e6c50cc..cba58fb 100644 (file)
@@ -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!!! */
 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;
   /* 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;
   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;
 
 
 } s_link_CM02_t, *link_CM02_t;
 
 
index fa7e681..31e3397 100644 (file)
@@ -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;
 
 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;
 
 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);
 }
 
   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;
 {
   int iterator;
   void_f_void_t fun;