Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
No vm when ptask on
[simgrid.git] / src / surf / network_gtnets.c
index 8207982..8dec8b5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, 2008, 2009, 2010. The SimGrid Team.
+/* Copyright (c) 2007-2013. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -196,7 +196,7 @@ static void action_state_set(surf_action_t action,
   surf_action_state_set(action, state);
 }
 
-static double share_resources(double now)
+static double share_resources(surf_model_t network_model, double now)
 {
   xbt_swag_t running_actions =
       surf_network_model->states.running_action_set;
@@ -210,17 +210,17 @@ static double share_resources(double now)
 
   XBT_DEBUG("Calling gtnets_get_time_to_next_flow_completion");
   time_to_next_flow_completion = gtnets_get_time_to_next_flow_completion();
-  XBT_DEBUG("gtnets_get_time_to_next_flow_completion received %lg",
+  XBT_DEBUG("gtnets_get_time_to_next_flow_completion received %g",
          time_to_next_flow_completion);
 
   return time_to_next_flow_completion;
 }
 
-static void update_actions_state(double now, double delta)
+static void update_actions_state(surf_model_t network_model, double now, double delta)
 {
   surf_action_network_GTNETS_t action = NULL;
   xbt_swag_t running_actions =
-      surf_network_model->states.running_action_set;
+      network_model->states.running_action_set;
 
   /* If there are no running flows, just return */
   if (time_to_next_flow_completion < 0.0) {
@@ -400,7 +400,7 @@ static void gtnets_action_set_category(surf_action_t action, const char *categor
 }
 #endif
 
-static void finalize(void)
+static void finalize(surf_model_t network_model)
 {
   gtnets_finalize();
 }
@@ -410,6 +410,7 @@ static void surf_network_model_init_internal(void)
   surf_network_model = surf_model_init();
 
   surf_network_model->name = "network GTNetS";
+  surf_network_model->type = SURF_MODEL_TYPE_NETWORK;
   surf_network_model->action_unref = action_unref;
   surf_network_model->action_cancel = action_cancel;
   surf_network_model->action_recycle = action_recycle;