From: Arnaud Giersch Date: Sun, 28 Oct 2012 10:58:04 +0000 (+0100) Subject: Fix compilation without MC. X-Git-Tag: v3_9_rc1~91^2~158 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/111e204ea2a49f1839ddcf556e6e8c06085fd021 Fix compilation without MC. --- diff --git a/src/simix/smx_smurf.c b/src/simix/smx_smurf.c index f3ebc520f7..d5a93fc25b 100644 --- a/src/simix/smx_smurf.c +++ b/src/simix/smx_smurf.c @@ -558,6 +558,7 @@ void SIMIX_simcall_pre(smx_simcall_t simcall, int value) SIMIX_simcall_answer(simcall); break; +#ifdef HAVE_MC case SIMCALL_MC_SNAPSHOT: simcall->mc_snapshot.s = MC_take_snapshot_liveness(); SIMIX_simcall_answer(simcall); @@ -568,7 +569,8 @@ void SIMIX_simcall_pre(smx_simcall_t simcall, int value) snapshot_compare(simcall->mc_compare_snapshots.snapshot1, simcall->mc_compare_snapshots.snapshot2); SIMIX_simcall_answer(simcall); break; - +#endif /* HAVE_MC */ + case SIMCALL_NONE: THROWF(arg_error,0,"Asked to do the noop syscall on %s@%s", SIMIX_process_get_name(simcall->issuer), diff --git a/src/simix/smx_smurf_private.h b/src/simix/smx_smurf_private.h index 2009207771..ad7ef0679c 100644 --- a/src/simix/smx_smurf_private.h +++ b/src/simix/smx_smurf_private.h @@ -98,8 +98,6 @@ SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_STAT), \ SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_UNLINK),\ SIMCALL_ENUM_ELEMENT(SIMCALL_FILE_LS),\ SIMCALL_ENUM_ELEMENT(SIMCALL_ASR_GET_PROPERTIES), \ -SIMCALL_ENUM_ELEMENT(SIMCALL_MC_SNAPSHOT), \ -SIMCALL_ENUM_ELEMENT(SIMCALL_MC_COMPARE_SNAPSHOTS), \ /* ****************************************************************************************** */ \ /* TUTORIAL: New API */ \ /* ****************************************************************************************** */ \ @@ -122,8 +120,16 @@ SIMCALL_ENUM_ELEMENT(SIMCALL_NEW_API_INIT) #define SIMCALL_LIST3 #endif +#ifdef HAVE_MC +#define SIMCALL_LIST4 \ + ,SIMCALL_ENUM_ELEMENT(SIMCALL_MC_SNAPSHOT) \ + ,SIMCALL_ENUM_ELEMENT(SIMCALL_MC_COMPARE_SNAPSHOTS) +#else +#define SIMCALL_LIST4 +#endif + /* SIMCALL_LIST is the final macro to use */ -#define SIMCALL_LIST SIMCALL_LIST1 SIMCALL_LIST2 SIMCALL_LIST3 +#define SIMCALL_LIST SIMCALL_LIST1 SIMCALL_LIST2 SIMCALL_LIST3 SIMCALL_LIST4 /* you can redefine the following macro differently to generate something else * with the list of enumeration values (e.g. a table of strings or a table of function pointers) */ diff --git a/src/simix/smx_user.c b/src/simix/smx_user.c index 84ce825d17..1fe90b1c07 100644 --- a/src/simix/smx_user.c +++ b/src/simix/smx_user.c @@ -1651,6 +1651,8 @@ xbt_dict_t simcall_file_ls(const char* mount, const char* path) return simcall->file_ls.result; } +#ifdef HAVE_MC + void *simcall_mc_snapshot(void) { smx_simcall_t simcall = SIMIX_simcall_mine(); @@ -1676,6 +1678,7 @@ int simcall_mc_compare_snapshots(void *s1, void *s2){ return simcall->mc_compare_snapshots.result; } +#endif /* HAVE_MC */ /* ****************************************************************************************** */ /* TUTORIAL: New API */