X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1540cf423448c5ab23f268ddb46a18a39018f8b3..ccf2eaeec8728da6bafa2a0701a4c799f57d1b75:/src/surf/cpu_cas01.c diff --git a/src/surf/cpu_cas01.c b/src/surf/cpu_cas01.c index c94bf46744..541ab3cf9a 100644 --- a/src/surf/cpu_cas01.c +++ b/src/surf/cpu_cas01.c @@ -314,15 +314,12 @@ static double cpu_share_resources_lazy(double now) GENERIC_ACTION(action).start, now + value, GENERIC_ACTION(action).max_duration); - if (action->index_heap >= 0) { - heap_remove(action); - } - if (min != -1) { + heap_remove(action); heap_insert(action, min, max_dur_flag ? MAX_DURATION : NORMAL); XBT_DEBUG("Insert at heap action(%p) min %lf now %lf", action, min, now); - } + } else DIE_IMPOSSIBLE; } //hereafter must have already the min value for this resource model @@ -599,7 +596,6 @@ static void cpu_action_set_max_duration(surf_action_t action, XBT_IN("(%p,%g)", action, duration); action->max_duration = duration; - /* insert cpu in modified_cpu set to notice the max duration change */ if (cpu_update_mechanism == UM_LAZY) heap_remove((surf_action_cpu_Cas01_t) action); XBT_OUT();