- while (not actionHeapIsEmpty() && double_equals(actionHeapTopDate(), now, sg_surf_precision)) {
-
- CpuAction* action = static_cast<CpuAction*>(actionHeapPop());
- XBT_CDEBUG(surf_kernel, "Something happened to action %p", action);
- if (TRACE_is_enabled()) {
- Cpu *cpu = static_cast<Cpu*>(lmm_constraint_id(lmm_get_cnst_from_var(getMaxminSystem(), action->getVariable(), 0)));
- TRACE_surf_host_set_utilization(cpu->getCname(), action->getCategory(),
- lmm_variable_getvalue(action->getVariable()), action->getLastUpdate(),
- now - action->getLastUpdate());
- }
-
- action->finish(Action::State::done);
- XBT_CDEBUG(surf_kernel, "Action %p finished", action);
+ while (not get_action_heap().empty() && double_equals(get_action_heap().top_date(), now, sg_surf_precision)) {
+ auto* action = static_cast<CpuAction*>(get_action_heap().pop());
+ XBT_DEBUG("Something happened to action %p", action);