]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/api.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into 'master'
[simgrid.git] / src / mc / api.cpp
index cb0d23ee997bb59a9df295568d8629c25025ebc5..b6a1df41838826ddbb1c7fdd7402b3ee634f1e70 100644 (file)
@@ -2,9 +2,9 @@
 
 #include "src/kernel/activity/MailboxImpl.hpp"
 #include "src/kernel/activity/MutexImpl.hpp"
+#include "src/kernel/actor/SimcallObserver.hpp"
 #include "src/mc/Session.hpp"
 #include "src/mc/checker/Checker.hpp"
-#include "src/mc/checker/SimcallObserver.hpp"
 #include "src/mc/mc_comm_pattern.hpp"
 #include "src/mc/mc_exit.hpp"
 #include "src/mc/mc_pattern.hpp"
@@ -458,15 +458,7 @@ std::vector<simgrid::mc::ActorInformation>& Api::get_actors() const
 
 unsigned long Api::get_maxpid() const
 {
-  static const char* name = nullptr;
-  if (not name) {
-    name = "simgrid::kernel::actor::maxpid";
-    if (mc_model_checker->get_remote_process().find_variable(name) == nullptr)
-      name = "maxpid"; // We seem to miss the namespaces when compiling with GCC
-  }
-  unsigned long maxpid;
-  mc_model_checker->get_remote_process().read_variable(name, &maxpid, sizeof(maxpid));
-  return maxpid;
+  return mc_model_checker->get_remote_process().get_maxpid();
 }
 
 int Api::get_actors_size() const