Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Do not use a dangerous guess-the-type logic in snapshot_compare()
[simgrid.git] / src / mc / mc_state.h
index 8ab1b11..93b350f 100644 (file)
@@ -8,6 +8,7 @@
 #define SIMGRID_MC_STATE_H
 
 #include <xbt/base.h>
+#include <xbt/dynar.h>
 
 #include <simgrid_config.h>
 #include "src/simix/smx_private.h"
@@ -46,7 +47,7 @@ typedef struct XBT_PRIVATE mc_state {
   s_smx_simcall_t executed_req;         /* The executed request of the state */
   int req_num;                      /* The request number (in the case of a
                                        multi-request like waitany ) */
-  mc_snapshot_t system_state;      /* Snapshot of system state */
+  simgrid::mc::Snapshot* system_state;      /* Snapshot of system state */
   int num;
   int in_visited_states;
   // comm determinism verification (xbt_dynar_t<xbt_dynar_t<mc_comm_pattern_t>):
@@ -67,4 +68,12 @@ XBT_PRIVATE void MC_state_remove_interleave_process(mc_state_t state, smx_proces
 
 SG_END_DECL()
 
+namespace simgrid {
+namespace mc {
+
+XBT_PRIVATE int snapshot_compare(mc_state_t state1, mc_state_t state2);
+
+}
+}
+
 #endif