X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c5ad8ca1a68bbaa9152471c8d0eeb99d762f0d86..d549f28334d919c9efe4cca11076418a3280bdec:/src/surf/network.c diff --git a/src/surf/network.c b/src/surf/network.c index 1c881426b3..af6e1ed707 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -60,7 +60,6 @@ static void update_action_remaining(double now); static xbt_swag_t net_modified_set = NULL; static xbt_heap_t net_action_heap = NULL; -xbt_swag_t keep_track = NULL; /* added to manage the communication action's heap */ static void net_action_update_index_heap(void *action, int i) @@ -81,7 +80,7 @@ static void heap_insert(surf_action_network_CM02_t action, double key, enum h } static void heap_remove(surf_action_network_CM02_t action){ - action->hat = NONE; + action->hat = NOTSET; if(((surf_action_network_CM02_t) action)->index_heap >= 0){ xbt_heap_remove(net_action_heap,action->index_heap); } @@ -373,7 +372,7 @@ void net_action_recycle(surf_action_t action) } #ifdef HAVE_LATENCY_BOUND_TRACKING -static int net_get_link_latency_limited(surf_action_t action) +int net_get_link_latency_limited(surf_action_t action) { return action->latency_limited; } @@ -465,9 +464,7 @@ static double net_share_resources_lazy(double now) XBT_DEBUG("Before share resources, the size of modified actions set is %d", xbt_swag_size(net_modified_set)); update_action_remaining(now); - keep_track = net_modified_set; lmm_solve(network_maxmin_system); - keep_track = NULL; XBT_DEBUG("After share resources, The size of modified actions set is %d", xbt_swag_size(net_modified_set)); @@ -1080,8 +1077,8 @@ static void surf_network_model_init_internal(void) if(network_update_mechanism == UM_LAZY){ net_action_heap = xbt_heap_new(8,NULL); xbt_heap_set_update_callback(net_action_heap, net_action_update_index_heap); - net_modified_set = - xbt_swag_new(xbt_swag_offset(comm, action_list_hookup)); + net_modified_set = xbt_swag_new(xbt_swag_offset(comm, action_list_hookup)); + network_maxmin_system->keep_track = net_modified_set; } }