Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
this example needs to forcefully destroy the VMs
[simgrid.git] / src / mc / mc_model_checker.c
index e3cc961..98aa299 100644 (file)
@@ -16,6 +16,7 @@ mc_model_checker_t MC_model_checker_new(pid_t pid, int socket)
   mc->fd_clear_refs = -1;
   mc->fd_pagemap = -1;
   MC_process_init(&mc->process, pid, socket);
+  mc->hosts = xbt_dict_new();
   return mc;
 }
 
@@ -25,4 +26,16 @@ void MC_model_checker_delete(mc_model_checker_t mc)
   if(mc->record)
     xbt_dynar_free(&mc->record);
   MC_process_clear(&mc->process);
+  xbt_dict_free(&mc->hosts);
+}
+
+unsigned long MC_smx_get_maxpid(void)
+{
+  if (mc_mode == MC_MODE_STANDALONE)
+    return simix_process_maxpid;
+
+  unsigned long maxpid;
+  MC_process_read_variable(&mc_model_checker->process, "simix_process_maxpid",
+    &maxpid, sizeof(maxpid));
+  return maxpid;
 }