X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/446069ad8e6d4580649af853f64ebbd259737bbe..9d483650be13b1787260d9c225ab6f72746ccb07:/src/surf/cpu_interface.cpp diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index a90e142e33..08cd7c4f01 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -20,22 +20,15 @@ simgrid::surf::CpuModel *surf_cpu_model_vm; namespace simgrid { namespace surf { -/************* - * Callbacks * - *************/ - -simgrid::xbt::signal cpuActionStateChangedCallbacks; - /********* * Model * *********/ -CpuModel::~CpuModel() = default; - void CpuModel::updateActionsStateLazy(double now, double /*delta*/) { while ((xbt_heap_size(getActionHeap()) > 0) && (double_equals(xbt_heap_maxkey(getActionHeap()), now, sg_surf_precision))) { + CpuAction *action = static_cast(xbt_heap_pop(getActionHeap())); XBT_CDEBUG(surf_kernel, "Something happened to action %p", action); if (TRACE_is_enabled()) { @@ -52,7 +45,6 @@ void CpuModel::updateActionsStateLazy(double now, double /*delta*/) /* set the remains to 0 due to precision problems when updating the remaining amount */ action->setRemains(0); action->setState(Action::State::done); - action->heapRemove(getActionHeap()); //FIXME: strange call since action was already popped } if (TRACE_is_enabled()) { //defining the last timestamp that we can safely dump to trace file @@ -115,11 +107,6 @@ void CpuModel::updateActionsStateFull(double now, double delta) } } -bool CpuModel::next_occuring_event_isIdempotent() -{ - return true; -} - /************ * Resource * ************/