X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0e52c20b7cb149f6a7a0defdfc4fe92ecd26d54b..91bb8b44ef09735fc79f40a3d9eeb69456a46909:/src/mc/mc_checkpoint.c diff --git a/src/mc/mc_checkpoint.c b/src/mc/mc_checkpoint.c index c75d4f51ac..2b2fe9d033 100644 --- a/src/mc/mc_checkpoint.c +++ b/src/mc/mc_checkpoint.c @@ -1,4 +1,5 @@ -/* Copyright (c) 2008-2013 Da SimGrid Team. All rights reserved. */ +/* Copyright (c) 2008-2013. The SimGrid Team. + * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -724,7 +725,7 @@ static void MC_dump_checkpoint_ignore(mc_snapshot_t snapshot){ } -mc_snapshot_t MC_take_snapshot(){ +mc_snapshot_t MC_take_snapshot(int num_state){ mc_snapshot_t snapshot = xbt_new0(s_mc_snapshot_t, 1); snapshot->nb_processes = xbt_swag_size(simix_global->process_list); @@ -740,7 +741,8 @@ mc_snapshot_t MC_take_snapshot(){ //MC_get_hash_local(snapshot->hash_local, snapshot->stacks); } - MC_dump_checkpoint_ignore(snapshot); + if(num_state > 0) + MC_dump_checkpoint_ignore(snapshot); return snapshot; @@ -755,7 +757,7 @@ void MC_restore_snapshot(mc_snapshot_t snapshot){ } mc_snapshot_t SIMIX_pre_mc_snapshot(smx_simcall_t simcall){ - return MC_take_snapshot(); + return MC_take_snapshot(1); } void *MC_snapshot(void){