They were not used.
XBT_PUBLIC(void) MC_automaton_new_propositional_symbol(const char* id, int(*fct)(void));
XBT_PUBLIC(void) MC_automaton_new_propositional_symbol_pointer(const char *id, int* value);
-XBT_PUBLIC(void *) MC_snapshot(void);
-XBT_PUBLIC(int) MC_compare_snapshots(void *s1, void *s2);
XBT_PUBLIC(void) MC_cut(void);
XBT_PUBLIC(void) MC_ignore(void *addr, size_t size);
#define MC_assert(a) xbt_assert(a)
#define MC_automaton_new_propositional_symbol(a, b) ((void)0)
#define MC_automaton_new_propositional_symbol_pointer(a, b) ((void)0)
-#define MC_snapshot() ((void*)0)
-#define MC_compare_snapshots(a, b) 0
#define MC_cut() ((void)0)
#define MC_ignore(a, b) ((void)0)
XBT_PUBLIC(xbt_dict_t) simcall_asr_get_properties(const char *name);
/************************** MC simcalls **********************************/
-XBT_PUBLIC(void *) simcall_mc_snapshot(void);
-XBT_PUBLIC(int) simcall_mc_compare_snapshots(void *s1, void *s2);
XBT_PUBLIC(int) simcall_mc_random(int min, int max);
SG_END_DECL()
|| req->call == SIMCALL_MC_RANDOM
|| req->call == SIMCALL_MUTEX_LOCK
|| req->call == SIMCALL_MUTEX_TRYLOCK
-#ifdef HAVE_MC
- || req->call == SIMCALL_MC_SNAPSHOT
- || req->call == SIMCALL_MC_COMPARE_SNAPSHOTS
-#endif
;
}
}
}
-
-extern "C"
-mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall)
-{
- return simgrid::mc::take_snapshot(1);
-}
}
}
-void *MC_snapshot(void)
-{
- return simcall_mc_snapshot();
-}
-
-int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall,
- mc_snapshot_t s1, mc_snapshot_t s2)
-{
- return snapshot_compare(s1, s2);
-}
-
-int MC_compare_snapshots(void *s1, void *s2)
-{
- return simcall_mc_compare_snapshots(s1, s2);
-}
-
void MC_cut(void)
{
user_max_depth_reached = 1;
break;
}
- case SIMCALL_MC_SNAPSHOT:
- type = "MC_SNAPSHOT";
- args = nullptr;
- break;
-
- case SIMCALL_MC_COMPARE_SNAPSHOTS:
- type = "MC_COMPARE_SNAPSHOTS";
- args = nullptr;
- break;
-
case SIMCALL_MC_RANDOM:
type = "MC_RANDOM";
args = bprintf("%d", value);
label = bprintf("[(%lu)] MC_RANDOM (%d)", issuer->pid, value);
break;
- case SIMCALL_MC_SNAPSHOT:
- if (issuer->host)
- label =
- bprintf("[(%lu)%s] MC_SNAPSHOT", issuer->pid,
- MC_smx_process_get_host_name(issuer));
- else
- label = bprintf("[(%lu)] MC_SNAPSHOT", issuer->pid);
- break;
-
- case SIMCALL_MC_COMPARE_SNAPSHOTS:
- if (issuer->host)
- label =
- bprintf("[(%lu)%s] MC_COMPARE_SNAPSHOTS", issuer->pid,
- MC_smx_process_get_host_name(issuer));
- else
- label = bprintf("[(%lu)] MC_COMPARE_SNAPSHOTS", issuer->pid);
- break;
-
default:
THROW_UNIMPLEMENTED;
}
return simcall_BODY_run_kernel((void*) &code);
}
-#ifdef HAVE_MC
-
-void *simcall_mc_snapshot(void) {
- return simcall_BODY_mc_snapshot();
-}
-
-int simcall_mc_compare_snapshots(void *s1, void *s2) {
- return simcall_BODY_mc_compare_snapshots((simgrid::mc::Snapshot*)s1, (simgrid::mc::Snapshot*)s2);
-}
-
-#endif /* HAVE_MC */
-
int simcall_mc_random(int min, int max) {
return simcall_BODY_mc_random(min, max);
}
static inline void simcall_run_kernel__set__code(smx_simcall_t simcall, void* arg) {
simcall->args[0].dp = arg;
}
-#ifdef HAVE_MC
-
-static inline mc_snapshot_t simcall_mc_snapshot__get__result(smx_simcall_t simcall){
- return (mc_snapshot_t) simcall->result.dp;
-}
-static inline void simcall_mc_snapshot__set__result(smx_simcall_t simcall, void* result){
- simcall->result.dp = result;
-}
-
-static inline mc_snapshot_t simcall_mc_compare_snapshots__get__s1(smx_simcall_t simcall) {
- return (mc_snapshot_t) simcall->args[0].dp;
-}
-static inline void simcall_mc_compare_snapshots__set__s1(smx_simcall_t simcall, void* arg) {
- simcall->args[0].dp = arg;
-}
-static inline mc_snapshot_t simcall_mc_compare_snapshots__get__s2(smx_simcall_t simcall) {
- return (mc_snapshot_t) simcall->args[1].dp;
-}
-static inline void simcall_mc_compare_snapshots__set__s2(smx_simcall_t simcall, void* arg) {
- simcall->args[1].dp = arg;
-}
-static inline int simcall_mc_compare_snapshots__get__result(smx_simcall_t simcall){
- return simcall->result.i;
-}
-static inline void simcall_mc_compare_snapshots__set__result(smx_simcall_t simcall, int result){
- simcall->result.i = result;
-}
-#endif
-
/* The prototype of all simcall handlers, automatically generated for you */
XBT_PRIVATE sg_size_t simcall_HANDLER_storage_get_free_size(smx_simcall_t simcall, smx_storage_t storage);
XBT_PRIVATE sg_size_t simcall_HANDLER_storage_get_used_size(smx_simcall_t simcall, smx_storage_t name);
XBT_PRIVATE xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char* name);
-XBT_PRIVATE int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);
-#ifdef HAVE_MC
-XBT_PRIVATE mc_snapshot_t simcall_HANDLER_mc_snapshot(smx_simcall_t simcall);
-XBT_PRIVATE int simcall_HANDLER_mc_compare_snapshots(smx_simcall_t simcall, mc_snapshot_t s1, mc_snapshot_t s2);
-#endif
+XBT_PRIVATE int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);
\ No newline at end of file
SIMIX_simcall_handle(&self->simcall, 0);
}
- }
-#ifdef HAVE_MC
-
-inline static mc_snapshot_t simcall_BODY_mc_snapshot() {
- smx_process_t self = SIMIX_process_self();
-
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_mc_snapshot(&self->simcall);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_MC_SNAPSHOT;
- memset(&self->simcall.result, 0, sizeof(self->simcall.result));
- memset(self->simcall.args, 0, sizeof(self->simcall.args));
-
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
- return (mc_snapshot_t) self->simcall.result.dp;
- }
-
-inline static int simcall_BODY_mc_compare_snapshots(mc_snapshot_t s1, mc_snapshot_t s2) {
- smx_process_t self = SIMIX_process_self();
-
- /* Go to that function to follow the code flow through the simcall barrier */
- if (0) simcall_HANDLER_mc_compare_snapshots(&self->simcall, s1, s2);
- /* end of the guide intended to the poor programmer wanting to go from MSG to Surf */
-
- self->simcall.call = SIMCALL_MC_COMPARE_SNAPSHOTS;
- memset(&self->simcall.result, 0, sizeof(self->simcall.result));
- memset(self->simcall.args, 0, sizeof(self->simcall.args));
- self->simcall.args[0].dp = (void*) s1;
- self->simcall.args[1].dp = (void*) s2;
- if (self != simix_global->maestro_process) {
- XBT_DEBUG("Yield process '%s' on simcall %s (%d)", self->name,
- SIMIX_simcall_name(self->simcall.call), (int)self->simcall.call);
- SIMIX_process_yield(self);
- } else {
- SIMIX_simcall_handle(&self->simcall, 0);
- }
- return (int) self->simcall.result.i;
- }
-#endif
+ }
\ No newline at end of file
SIMCALL_ASR_GET_PROPERTIES,
SIMCALL_MC_RANDOM,
SIMCALL_SET_CATEGORY,
- SIMCALL_RUN_KERNEL,
-#ifdef HAVE_MC
- SIMCALL_MC_SNAPSHOT,
- SIMCALL_MC_COMPARE_SNAPSHOTS,
-#endif
- NUM_SIMCALLS
+ SIMCALL_RUN_KERNEL, NUM_SIMCALLS
} e_smx_simcall_t;
"SIMCALL_ASR_GET_PROPERTIES",
"SIMCALL_MC_RANDOM",
"SIMCALL_SET_CATEGORY",
- "SIMCALL_RUN_KERNEL",
-#ifdef HAVE_MC
- "SIMCALL_MC_SNAPSHOT",
- "SIMCALL_MC_COMPARE_SNAPSHOTS",
-#endif
-};
+ "SIMCALL_RUN_KERNEL",};
/**
* @brief (in kernel mode) unpack the simcall and activate the handler
SIMIX_run_kernel( simcall->args[0].dp);
SIMIX_simcall_answer(simcall);
break;
-
-#ifdef HAVE_MC
-case SIMCALL_MC_SNAPSHOT:
- simcall->result.dp = simcall_HANDLER_mc_snapshot(simcall );
- SIMIX_simcall_answer(simcall);
- break;
-
-case SIMCALL_MC_COMPARE_SNAPSHOTS:
- simcall->result.i = simcall_HANDLER_mc_compare_snapshots(simcall , (mc_snapshot_t) simcall->args[0].dp, (mc_snapshot_t) simcall->args[1].dp);
- SIMIX_simcall_answer(simcall);
- break;
-
-#endif
case NUM_SIMCALLS:
break;
case SIMCALL_NONE:
Proc - set_category (void) (synchro, void*, smx_synchro_t) (category, const char*)
Proc - run_kernel (void) (code, void*)
-
-## HAVE_MC
-Func H mc_snapshot (void*, mc_snapshot_t)
-Func H mc_compare_snapshots (int) (s1, void*, mc_snapshot_t) (s2, void*, mc_snapshot_t)