Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use dynar to represent routes
[simgrid.git] / src / surf / network_constant.c
index 2c91cc3..eba71de 100644 (file)
@@ -96,11 +96,6 @@ static int action_unref(surf_action_t action)
   return 0;
 }
 
-static void action_ref(surf_action_t action)
-{
-  action->refcount++;
-}
-
 static void action_cancel(surf_action_t action)
 {
   return;
@@ -207,16 +202,9 @@ static surf_action_t communicate(void *src, void *dst, double size,
 }
 
 /* returns an array of link_Constant_t */
-static const void **get_route(void *src, void *dst)
+static xbt_dynar_t get_route(void *src, void *dst)
 {
-  xbt_assert0(0, "Calling this function does not make any sense");
-  return (const void **) NULL;
-}
-
-static int get_route_size(void *src, void *dst)
-{
-  xbt_assert0(0, "Calling this function does not make any sense");
-  return 0;
+  xbt_die("Calling this function does not make any sense");
 }
 
 static double get_link_bandwidth(const void *link)
@@ -274,7 +262,6 @@ static void surf_network_model_init_internal(void)
 
   surf_network_model->name = "network constant";
   surf_network_model->action_unref = action_unref;
-  surf_network_model->action_ref = action_ref;
   surf_network_model->action_cancel = action_cancel;
   surf_network_model->action_recycle = action_recycle;
 
@@ -293,7 +280,6 @@ static void surf_network_model_init_internal(void)
 
   surf_network_model->extension.network.communicate = communicate;
   surf_network_model->extension.network.get_route = get_route;
-  surf_network_model->extension.network.get_route_size = get_route_size;
   surf_network_model->extension.network.get_link_bandwidth =
     get_link_bandwidth;
   surf_network_model->extension.network.get_link_latency = get_link_latency;