Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Mark some remote pointers as such
[simgrid.git] / src / mc / mc_request.cpp
index f7ac9b2..679df52 100644 (file)
@@ -101,9 +101,11 @@ bool request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2)
   /* FIXME: the following rule assumes that the result of the
    * isend/irecv call is not stored in a buffer used in the
    * test call. */
-  /*if(   (r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
+#if 0
+  if((r1->call == SIMCALL_COMM_ISEND || r1->call == SIMCALL_COMM_IRECV)
      &&  r2->call == SIMCALL_COMM_TEST)
-     return FALSE; */
+     return FALSE;
+#endif
 
   if (r1->call == SIMCALL_COMM_WAIT
       && (r2->call == SIMCALL_COMM_WAIT || r2->call == SIMCALL_COMM_TEST)
@@ -134,7 +136,7 @@ bool request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2)
   return true;
 }
 
-// Those are MC_state_get_internal_request(state)
+// Those are internal_req
 bool request_depend(smx_simcall_t r1, smx_simcall_t r2)
 {
   if (r1->issuer == r2->issuer)
@@ -288,8 +290,8 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
       } else
         act = remote_act;
 
-      smx_process_t src_proc = MC_smx_resolve_process(act->comm.src_proc);
-      smx_process_t dst_proc = MC_smx_resolve_process(act->comm.dst_proc);
+      smx_process_t src_proc = MC_smx_resolve_process(simgrid::mc::remote(act->comm.src_proc));
+      smx_process_t dst_proc = MC_smx_resolve_process(simgrid::mc::remote(act->comm.dst_proc));
       args = bprintf("comm=%s [(%lu)%s (%s)-> (%lu)%s (%s)]", p,
                      src_proc ? src_proc->pid : 0,
                      src_proc ? MC_smx_process_get_host_name(src_proc) : "",
@@ -322,8 +324,8 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
       type = "Test TRUE";
       p = pointer_to_string(remote_act);
 
-      smx_process_t src_proc = MC_smx_resolve_process(act->comm.src_proc);
-      smx_process_t dst_proc = MC_smx_resolve_process(act->comm.dst_proc);
+      smx_process_t src_proc = MC_smx_resolve_process(simgrid::mc::remote(act->comm.src_proc));
+      smx_process_t dst_proc = MC_smx_resolve_process(simgrid::mc::remote(act->comm.dst_proc));
       args = bprintf("comm=%s [(%lu)%s (%s) -> (%lu)%s (%s)]", p,
                      src_proc->pid,
                      MC_smx_process_get_name(src_proc),
@@ -388,7 +390,7 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
 
     args = bprintf("locked = %d, owner = %d, sleeping = %d",
       mutex.locked,
-      mutex.owner != nullptr ? (int) MC_smx_resolve_process(mutex.owner)->pid : -1,
+      mutex.owner != nullptr ? (int) MC_smx_resolve_process(simgrid::mc::remote(mutex.owner))->pid : -1,
       mutex_sleeping.count);
     break;
   }
@@ -518,8 +520,8 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
       mc_model_checker->process().read_bytes(&synchro,
         sizeof(synchro), remote(remote_act));
 
-      smx_process_t src_proc = MC_smx_resolve_process(synchro.comm.src_proc);
-      smx_process_t dst_proc = MC_smx_resolve_process(synchro.comm.dst_proc);
+      smx_process_t src_proc = MC_smx_resolve_process(simgrid::mc::remote(synchro.comm.src_proc));
+      smx_process_t dst_proc = MC_smx_resolve_process(simgrid::mc::remote(synchro.comm.dst_proc));
       if (issuer->host)
         label = simgrid::xbt::string_printf("[(%lu)%s] Wait [(%lu)->(%lu)]",
                     issuer->pid,