]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/private.h
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Bugfix: fix memory leak related to transition creation/destruction. Instead of using...
[simgrid.git] / src / mc / private.h
index b6a3762dc4b8a7e093e6615179466847a0a5616b..42b30001e9f1c298c1ed68d9e1a3fc77915ea916 100644 (file)
@@ -66,27 +66,34 @@ void MC_dpor(void);
 typedef struct s_mc_transition{
   XBT_SETSET_HEADERS;
   char* name;
-  unsigned int refcount;
   mc_trans_type_t type;
   smx_process_t process;
   smx_rdv_t rdv;
   smx_comm_t comm;          /* reference to the simix network communication */
+  
+  /* Used only for random transitions */
+  int min;                  /* min random value */ 
+  int max;                  /* max random value */
+  int current_value;        /* current value */
 } s_mc_transition_t;
 
+void MC_random_create(int,int);
 void MC_transition_delete(mc_transition_t);
 int MC_transition_depend(mc_transition_t, mc_transition_t);
 
 /******************************** States **************************************/
 typedef struct mc_state{
-  xbt_setset_set_t transitions;
-  xbt_setset_set_t enabled_transitions;
-  xbt_setset_set_t interleave;
-  xbt_setset_set_t done;
-  mc_transition_t executed_transition;
+  xbt_setset_set_t created_transitions;   /* created in this state */
+  xbt_setset_set_t transitions;           /* created in this state + inherited */
+  xbt_setset_set_t enabled_transitions;   /* they can be executed by the mc */
+  xbt_setset_set_t interleave;            /* the ones to be executed by the mc */
+  xbt_setset_set_t done;                  /* already executed transitions */
+  mc_transition_t executed_transition;    /* last executed transition */
 } s_mc_state_t, *mc_state_t;
 
 extern xbt_fifo_t mc_stack;
 extern xbt_setset_t mc_setset;
+extern mc_state_t mc_current_state;
 
 mc_state_t MC_state_new(void);
 void MC_state_delete(mc_state_t);