X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c0f3756528127131a1947179f56871657a084259..eecf563b3a3a0333dac9f754fe11f047c99cd27d:/src/surf/cpu_ti.cpp diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index 6ce941766b..d15f1d2d58 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -561,12 +561,8 @@ CpuAction *CpuTi::sleep(double duration) action->set_max_duration(duration); action->suspended_ = kernel::resource::Action::SuspendStates::sleeping; - if (duration == NO_MAX_DURATION) { - /* Move to the *end* of the corresponding action set. This convention is used to speed up update_resource_state */ - simgrid::xbt::intrusive_erase(*action->get_state_set(), *action); - action->state_set_ = &static_cast(get_model())->runningActionSetThatDoesNotNeedBeingChecked_; - action->get_state_set()->push_back(*action); - } + if (duration < 0) // NO_MAX_DURATION + action->set_state(simgrid::kernel::resource::Action::State::IGNORED); action_set_.push_back(*action);