X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fd7f6b8ed24809565026336235edcd4eedea1465..c54b74368b97bb0d0b42aea6857681d7ff9df910:/src/surf/network.c diff --git a/src/surf/network.c b/src/surf/network.c index f8e841bac9..1077cdbd66 100644 --- a/src/surf/network.c +++ b/src/surf/network.c @@ -6,8 +6,8 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "network_private.h" -#include "cpu_private.h" #include "xbt/log.h" +#include "xbt/str.h" XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_network, surf, "Logging specific to the SURF network module"); @@ -427,8 +427,6 @@ static void update_actions_state(double now, double delta) if (action->generic_action.max_duration != NO_MAX_DURATION) double_update(&(action->generic_action.max_duration), delta); - /* if(action->generic_action.remains<.00001) action->generic_action.remains=0; */ - if ((action->generic_action.remains <= 0) && (lmm_get_variable_weight(action->variable) > 0)) { action->generic_action.finish = surf_get_clock(); @@ -460,7 +458,7 @@ static void update_actions_state(double now, double delta) static void update_resource_state(void *id, tmgr_trace_event_t event_type, - double value) + double value, double date) { link_CM02_t nw_link = id; /* printf("[" "%lg" "] Asking to update network card \"%s\" with value " */ @@ -474,11 +472,12 @@ static void update_resource_state(void *id, } else if (event_type == nw_link->lat_event) { double delta = value - nw_link->lat_current; lmm_variable_t var = NULL; + lmm_element_t elem = NULL; surf_action_network_CM02_t action = NULL; nw_link->lat_current = value; - while (lmm_get_var_from_cnst - (network_maxmin_system, nw_link->constraint, &var)) { + while ((var= lmm_get_var_from_cnst + (network_maxmin_system, nw_link->constraint, &elem))) { action = lmm_variable_id(var); action->lat_current += delta; if (action->rate < 0)