Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fetch simix_process_maxpid from MCed
[simgrid.git] / src / mc / mc_record.c
index b898e56..9d615b3 100644 (file)
 #include <xbt.h>
 #include <simgrid/simix.h>
 
-#include "mc_base.h"
 #include "mc_record.h"
+#include "mc_base.h"
 
 #ifdef HAVE_MC
 #include "mc_private.h"
+#include "mc_model_checker.h"
+#include "mc_state.h"
+#include "mc_smx.h"
 #endif
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_record, mc,
@@ -106,7 +109,8 @@ char* MC_record_stack_to_string(xbt_fifo_t stack)
     mc_state_t state = (mc_state_t) xbt_fifo_get_item_content(item);
     int value = 0;
     smx_simcall_t saved_req = MC_state_get_executed_request(state, &value);
-    int pid = saved_req->issuer->pid;
+    const smx_process_t issuer = MC_smx_simcall_get_issuer(saved_req);
+    const int pid = issuer->pid;
 
     // Serialization the (pid, value) pair:
     const char* sep = (item!=start) ? ";" : "";
@@ -140,5 +144,5 @@ void MC_record_replay_from_string(const char* path_string)
 
 void MC_record_replay_init()
 {
-  mc_time = xbt_new0(double, simix_process_maxpid);
+  mc_time = xbt_new0(double, MC_smx_get_maxpid());
 }