- CpuAction* action = static_cast<CpuAction*>(get_action_heap().pop());
- XBT_CDEBUG(surf_kernel, "Something happened to action %p", action);
-
- action->finish(kernel::resource::Action::State::done);
- XBT_CDEBUG(surf_kernel, "Action %p finished", action);
- }
- if (TRACE_is_enabled()) {
- //defining the last timestamp that we can safely dump to trace file
- //without losing the event ascending order (considering all CPU's)
- double smaller = -1;
- for (kernel::resource::Action const& action : *get_running_action_set()) {
- if (smaller < 0 || action.get_last_update() < smaller)
- smaller = action.get_last_update();
- }
- if (smaller > 0) {
- TRACE_last_timestamp_to_dump = smaller;
- }
+ action->finish(kernel::resource::Action::State::FINISHED);
+ XBT_DEBUG("Action %p finished", action);