X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b356ce9a510410f879eb3cd1b16b33856aebfdbe..4429a5bdc377b1e8e1e6b1eefc3c56a5f251a47d:/src/surf/cpu_cas01.cpp diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index 04db0b1160..1f5ebb5775 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -114,7 +114,7 @@ void CpuCas01::onSpeedChange() { CpuCas01Action* action = static_cast(lmm_variable_id(var)); lmm_update_variable_bound(model()->getMaxminSystem(), action->getVariable(), speed_.scale * speed_.peak); - } + } Cpu::onSpeedChange(); } @@ -179,7 +179,7 @@ CpuAction *CpuCas01::sleep(double duration) // FIXME: sleep variables should not consume 1.0 in lmm_expand action->maxDuration_ = duration; action->suspended_ = 2; - if (duration == NO_MAX_DURATION) { + if (duration < 0) { // NO_MAX_DURATION /* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */ action->getStateSet()->erase(action->getStateSet()->iterator_to(*action)); action->stateSet_ = static_cast(model())->p_cpuRunningActionSetThatDoesNotNeedBeingChecked;