X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3d12836da9798f96c230170b4c284cc34a322185..f53ee0c4bdeaffa3c7a781f45f640e5f32cbb480:/src/mc/mc_global.c diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index db1ad4f4a5..e924d16857 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -103,13 +103,8 @@ void MC_exit(int method) int MC_random(int min, int max) { - MC_random_create(min,max); - SIMIX_process_yield(); - - if(!mc_replay_mode) - return mc_current_state->executed_transition->current_value; - else - return mc_current_state->executed_transition->current_value - 1; + MC_trans_intercept_random(min, max); + return mc_current_state->executed_transition->random.value; } /** @@ -237,6 +232,7 @@ void MC_state_delete(mc_state_t state) mc_transition_t trans; xbt_setset_foreach(state->created_transitions, cursor, trans){ + xbt_setset_elm_remove(mc_setset, trans); MC_transition_delete(trans); } @@ -275,12 +271,7 @@ void MC_execute_surf_actions(void) DEBUG5("Resource [%s] (%d): Executing RUNNING action \"%s\" (%p) MaxDuration %lf", model->name, xbt_swag_size(model->states.running_action_set), smx_action->name, smx_action, action->max_duration); - - /* Copy the transfered data of the completed network actions */ - /* FIXME: be carefull it might not be an action of the network model */ - if(smx_action && smx_action->data != NULL) - SIMIX_network_copy_data((smx_comm_t)smx_action->data); - + if(smx_action) SIMIX_action_signal_all(smx_action); }