Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove the client-side processing in simgrid::mc::handle_simcall()
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 7 Apr 2016 11:17:53 +0000 (13:17 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 7 Apr 2016 11:23:29 +0000 (13:23 +0200)
src/mc/mc_base.cpp
src/mc/mc_global.cpp

index f68fc96..cfd63ca 100644 (file)
@@ -214,30 +214,3 @@ int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max)
     return prng_random(min, max);
   return simcall->mc_value;
 }
-
-namespace simgrid {
-namespace mc {
-
-void handle_simcall(smx_simcall_t req, int value)
-{
-#if !HAVE_MC
-  SIMIX_simcall_handle(req, value);
-#else
-  if (mc_mode == MC_MODE_CLIENT) {
-    SIMIX_simcall_handle(req, value);
-    return;
-  }
-
-  for (auto& pi : mc_model_checker->process().smx_process_infos)
-    if (req == &pi.copy.simcall) {
-      mc_model_checker->simcall_handle(
-        mc_model_checker->process(), pi.copy.pid, value);
-      return;
-    }
-
-  xbt_die("Could not find the request");
-#endif
-}
-
-}
-}
index 04b2773..0f882a2 100644 (file)
@@ -115,6 +115,17 @@ void MC_run()
 namespace simgrid {
 namespace mc {
 
+void handle_simcall(smx_simcall_t req, int value)
+{
+  for (auto& pi : mc_model_checker->process().smx_process_infos)
+    if (req == &pi.copy.simcall) {
+      mc_model_checker->simcall_handle(
+        mc_model_checker->process(), pi.copy.pid, value);
+      return;
+    }
+  xbt_die("Could not find the request");
+}
+
 /**
  * \brief Re-executes from the state at position start all the transitions indicated by
  *        a given model-checker stack.
@@ -182,10 +193,8 @@ void replay(std::list<std::unique_ptr<simgrid::mc::State>> const& stack)
         call = MC_get_call_type(req);
 
       simgrid::mc::handle_simcall(req, value);
-
       if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
         MC_handle_comm_pattern(call, req, value, nullptr, 1);
-
       mc_model_checker->wait_for_requests();
 
       count++;