X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0e9c0448c6566825b170b98ecff716b098bda10e..0c43de62fbe4bfc243d6512296e09207e80bcd54:/src/simix/smx_global.c diff --git a/src/simix/smx_global.c b/src/simix/smx_global.c index 58397da7ee..e1f793e180 100644 --- a/src/simix/smx_global.c +++ b/src/simix/smx_global.c @@ -324,19 +324,20 @@ void SIMIX_run(void) ((void (*)(void*))timer->func)(timer->args); xbt_free(timer); } + /* Wake up all processes waiting for a Surf action to finish */ xbt_dynar_foreach(model_list, iter, model) { - set = model->states.failed_action_set; + set = surf_model_failed_action_set(model); while ((action = xbt_swag_extract(set))) - SIMIX_simcall_post((smx_action_t) action->data); - set = model->states.done_action_set; - while ((action = xbt_swag_extract(set))) { - if (action->data == NULL) + SIMIX_simcall_post((smx_action_t) surf_action_get_data(action)); + set = surf_model_done_action_set(model); + + while ((action = xbt_swag_extract(set))) + if (surf_action_get_data(action) == NULL) XBT_DEBUG("probably vcpu's action %p, skip", action); else - SIMIX_simcall_post((smx_action_t) action->data); - } + SIMIX_simcall_post((smx_action_t) surf_action_get_data(action)); } /* Autorestart all process */