Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
what is that pimple, for god's sake??
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 10 Nov 2011 10:18:17 +0000 (11:18 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 10 Nov 2011 10:18:17 +0000 (11:18 +0100)
src/surf/network.c
src/surf/network_constant.c
src/surf/network_im.c
src/surf/surf_private.h
src/surf/surf_routing.c
src/surf/workstation_ptask_L07.c

index 061b4f3..e3bd03a 100644 (file)
@@ -839,8 +839,7 @@ static void surf_network_model_init_internal(void)
                                            498000000, NULL,
                                            0.000015, NULL,
                                            SURF_RESOURCE_ON, NULL,
-                                           SURF_LINK_FATPIPE, NULL),
-                       net_get_link_latency);
+                                           SURF_LINK_FATPIPE, NULL));
 }
 
 
index da086e0..bf38931 100644 (file)
@@ -235,5 +235,5 @@ void surf_network_model_init_Constant()
   xbt_dynar_push(model_list, &surf_network_model);
 
   xbt_cfg_set_string(_surf_cfg_set, "routing", "none");
-  routing_model_create(sizeof(double), NULL, netcste_get_link_latency);
+  routing_model_create(sizeof(double), NULL);
 }
index aeded81..1e29a61 100644 (file)
@@ -873,8 +873,7 @@ static void im_surf_network_model_init_internal(void)
       im_net_create_resource(xbt_strdup("__loopback__"),
           498000000, NULL, 0.000015, NULL,
           SURF_RESOURCE_ON, NULL,
-          SURF_LINK_FATPIPE, NULL),
-          im_net_get_link_latency);
+          SURF_LINK_FATPIPE, NULL));
   im_net_modified_set =
       xbt_swag_new(xbt_swag_offset(comm, action_list_hookup));
 }
index 1c508d9..bc442cb 100644 (file)
@@ -188,7 +188,7 @@ struct s_routing_global {
   xbt_dynar_t last_route;
 };
 
-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_model_create(size_t size_of_link, void *loopback);
 XBT_PUBLIC(void) routing_register_callbacks(void);
 
 /**
index 20dba8a..de758a1 100644 (file)
@@ -46,7 +46,6 @@ static const char *src = NULL;  /* temporary store the source name of a route */
 static const char *dst = NULL;  /* temporary store the destination name of a route */
 static char *gw_src = NULL;     /* temporary store the gateway source name of a route */
 static char *gw_dst = NULL;     /* temporary store the gateway destination name of a route */
-static double_f_cpvoid_t get_link_latency = NULL;
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route, surf, "Routing part of surf");
 
@@ -816,8 +815,7 @@ e_surf_network_element_type_t get_network_element_type(const char *name)
  * 
  * Make a global routing structure and set all the parsing functions.
  */
-void routing_model_create(size_t size_of_links, void *loopback,
-                          double_f_cpvoid_t get_link_latency_fun)
+void routing_model_create(size_t size_of_links, void *loopback)
 {
   /* config the uniq global routing */
   global_routing = xbt_new0(s_routing_global_t, 1);
@@ -833,7 +831,6 @@ void routing_model_create(size_t size_of_links, void *loopback,
   global_routing->loopback = loopback;
   global_routing->size_of_link = size_of_links;
   global_routing->last_route = NULL;
-  get_link_latency = get_link_latency_fun;
   /* no current routing at moment */
   current_routing = NULL;
 }
@@ -956,7 +953,7 @@ double generic_get_link_latency(routing_component_t rc,
   route = route ? route : rc->get_route(rc, src, dst);
 
   xbt_dynar_foreach(route->generic_route.link_list, i, link) {
-    latency += get_link_latency(link);
+    latency += surf_network_model->extension.network.get_link_latency(link);
   }
   if (need_to_clean)
     generic_free_extended_route(route);
index 01f6019..82acc84 100644 (file)
@@ -895,8 +895,7 @@ static void ptask_model_init_internal(void)
                                                   498000000, NULL,
                                                   0.000015, NULL,
                                                   SURF_RESOURCE_ON, NULL,
-                                                  SURF_LINK_FATPIPE, NULL),
-                       ptask_get_link_latency);
+                                                  SURF_LINK_FATPIPE, NULL));
 
 }