Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Get ride of a supurious compiler warning
[simgrid.git] / src / surf / workstation_ptask_L07.c
index 2633d46..b66945f 100644 (file)
@@ -361,7 +361,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)
 {
   cpu_L07_t cpu = id;
   link_L07_t nw_link = id;
@@ -375,10 +375,11 @@ static void update_resource_state(void *id,
     } else if (event_type == nw_link->lat_event) {
       lmm_variable_t var = NULL;
       surf_action_workstation_L07_t action = NULL;
+      lmm_element_t elem = NULL;
 
       nw_link->lat_current = value;
-      while (lmm_get_var_from_cnst
-            (ptask_maxmin_system, nw_link->constraint, &var)) {
+      while ((var = lmm_get_var_from_cnst
+            (ptask_maxmin_system, nw_link->constraint, &elem))) {
        
 
        action = lmm_variable_id(var);
@@ -400,7 +401,7 @@ static void update_resource_state(void *id,
     if (event_type == cpu->power_event) {
       cpu->power_current = value;
       lmm_update_constraint_bound(ptask_maxmin_system, cpu->constraint,
-                                 cpu->power_current);
+                                 cpu->power_current * cpu->power_scale);
     } else if (event_type == cpu->state_event) {
       if (value > 0)
        cpu->state_current = SURF_CPU_ON;