X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/35cac2ff2faac99a3b8311f774ecbe86cfde1374..e487ef4538248f261ddb6e814357593df7646e33:/src/surf/cpu_im.c diff --git a/src/surf/cpu_im.c b/src/surf/cpu_im.c index 0a65e33600..e572147806 100644 --- a/src/surf/cpu_im.c +++ b/src/surf/cpu_im.c @@ -180,6 +180,8 @@ static void action_cancel(surf_action_t action) surf_action_state_set(action, SURF_ACTION_FAILED); xbt_heap_remove(action_heap, ((surf_action_cpu_Cas01_im_t) action)->index_heap); + xbt_swag_remove(action, + ((cpu_Cas01_im_t) ACTION_GET_CPU(action))->action_set); return; } @@ -272,7 +274,7 @@ static void update_actions_state(double now, double delta) surf_action_cpu_Cas01_im_t action; while ((xbt_heap_size(action_heap) > 0) - && (xbt_heap_maxkey(action_heap) <= now)) { + && (double_equals(xbt_heap_maxkey(action_heap), now))) { action = xbt_heap_pop(action_heap); DEBUG1("Action %p: finish", action); GENERIC_ACTION(action).finish = surf_get_clock();