X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e28c23f36068010d7a6bf9a4f687667973fd981b..6604439f3437486f84c0e239f28b162662631127:/src/surf/workstation_KCCFLN05.c diff --git a/src/surf/workstation_KCCFLN05.c b/src/surf/workstation_KCCFLN05.c index f0ba1e694a..056ef5c5db 100644 --- a/src/surf/workstation_KCCFLN05.c +++ b/src/surf/workstation_KCCFLN05.c @@ -9,7 +9,7 @@ #include "xbt/dict.h" #include "workstation_KCCFLN05_private.h" -XBT_LOG_NEW_DEFAULT_SUBCATEGORY(workstation_KCCFLN05, surf, +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_workstation, surf, "Logging specific to the SURF workstation module (KCCFLN05)"); static int nb_workstation = 0; @@ -257,8 +257,13 @@ static void update_actions_state(double now, double delta) surf_double_update(&(deltap), action->latency); action->latency = 0.0; } - if ((action->latency == 0.0) && !(action->suspended)) - lmm_update_variable_weight(maxmin_system, action->variable, 1.0); + if ((action->latency == 0.0) && !(action->suspended)) { + if((action)->lat_current==0.0) + lmm_update_variable_weight(maxmin_system,action->variable, 1.0); + else + lmm_update_variable_weight(maxmin_system, action->variable, + action->lat_current); + } } surf_double_update(&(action->generic_action.remains), lmm_variable_getvalue(action->variable) * deltap); @@ -896,6 +901,7 @@ static void resource_init_internal(void) surf_workstation_resource->extension_public->execute = execute; surf_workstation_resource->extension_public->sleep = action_sleep; surf_workstation_resource->extension_public->get_state = resource_get_state; + surf_workstation_resource->extension_public->get_speed = get_speed; surf_workstation_resource->extension_public->communicate = communicate; surf_workstation_resource->extension_public->execute_parallel_task = execute_parallel_task;