action = xbt_heap_pop(cpu_action_heap);
XBT_DEBUG("Action %p: finish", action);
GENERIC_ACTION(action).finish = surf_get_clock();
action = xbt_heap_pop(cpu_action_heap);
XBT_DEBUG("Action %p: finish", action);
GENERIC_ACTION(action).finish = surf_get_clock();
GENERIC_ACTION(action).remains = 0;
cpu_action_state_set((surf_action_t) action, SURF_ACTION_DONE);
heap_remove(action);
GENERIC_ACTION(action).remains = 0;
cpu_action_state_set((surf_action_t) action, SURF_ACTION_DONE);
heap_remove(action);