Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Read host name from remote process
[simgrid.git] / src / mc / mc_global.c
index bf677ae..56ad792 100644 (file)
@@ -35,6 +35,7 @@
 #include "mc_liveness.h"
 #include "mc_private.h"
 #include "mc_unw.h"
+#include "mc_smx.h"
 #endif
 #include "mc_record.h"
 #include "mc_protocol.h"
@@ -318,7 +319,7 @@ int MC_deadlock_check()
     int res;
     if ((res = MC_protocol_send_simple_message(mc_model_checker->process.socket,
       MC_MESSAGE_DEADLOCK_CHECK)))
-      xbt_die("Could not check deadlock state: %s",strerror(res));
+      xbt_die("Could not check deadlock state");
     s_mc_int_message_t message;
     ssize_t s = MC_receive_message(mc_model_checker->process.socket, &message, sizeof(message));
     if (s == -1)
@@ -336,12 +337,12 @@ int MC_deadlock_check()
   smx_process_t process;
   if (xbt_swag_size(simix_global->process_list)) {
     deadlock = TRUE;
-    xbt_swag_foreach(process, simix_global->process_list) {
-      if (MC_request_is_enabled(&process->simcall)) {
+    MC_EACH_SIMIX_PROCESS(process,
+      if (MC_process_is_enabled(process)) {
         deadlock = FALSE;
         break;
       }
-    }
+    );
   }
   return deadlock;
 }
@@ -474,7 +475,9 @@ void MC_replay(xbt_fifo_t stack)
     if (saved_req) {
       /* because we got a copy of the executed request, we have to fetch the  
          real one, pointed by the request field of the issuer process */
-      req = &saved_req->issuer->simcall;
+
+      const smx_process_t issuer = MC_smx_simcall_get_issuer(saved_req);
+      req = &issuer->simcall;
 
       /* Debug information */
       if (XBT_LOG_ISENABLED(mc_global, xbt_log_priority_debug)) {
@@ -488,7 +491,7 @@ void MC_replay(xbt_fifo_t stack)
       if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
         call = mc_get_call_type(req);
 
-      SIMIX_simcall_handle(req, value);
+      MC_simcall_handle(req, value);
 
       MC_SET_MC_HEAP;
       if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
@@ -559,7 +562,8 @@ void MC_replay_liveness(xbt_fifo_t stack)
         if (saved_req != NULL) {
           /* because we got a copy of the executed request, we have to fetch the
              real one, pointed by the request field of the issuer process */
-          req = &saved_req->issuer->simcall;
+          const smx_process_t issuer = MC_smx_simcall_get_issuer(saved_req);
+          req = &issuer->simcall;
 
           /* Debug information */
           if (XBT_LOG_ISENABLED(mc_global, xbt_log_priority_debug)) {
@@ -570,7 +574,7 @@ void MC_replay_liveness(xbt_fifo_t stack)
 
         }
 
-        SIMIX_simcall_handle(req, value);
+        MC_simcall_handle(req, value);
         MC_wait_for_requests();
       }