Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remove the horrible MC_EACH_SIMIX_PROCESS() macro
[simgrid.git] / src / mc / Process.hpp
index 62fad58..8de8435 100644 (file)
 #include <vector>
 #include <memory>
 
+#include <boost/range/iterator_range.hpp>
+
 #include <sys/types.h>
 
 #include <simgrid_config.h>
 
 #include <xbt/base.h>
 #include <xbt/dynar.h>
+#include <xbt/dynar.hpp>
 #include <xbt/mmalloc.h>
 
 #ifdef HAVE_MC
@@ -46,6 +49,16 @@ typedef int mc_process_cache_flags_t;
 #define MC_PROCESS_CACHE_FLAG_MALLOC_INFO 2
 #define MC_PROCESS_CACHE_FLAG_SIMIX_PROCESSES 4
 
+struct s_mc_smx_process_info {
+  /** MCed address of the process */
+  void* address;
+  /** (Flat) Copy of the process data structure */
+  struct s_smx_process copy;
+  /** Hostname (owned by `mc_modelchecker->hostnames`) */
+  const char* hostname;
+  char* name;
+};
+
 namespace simgrid {
 namespace mc {
 
@@ -194,6 +207,7 @@ public:
 
   void ignore_local_variable(const char *var_name, const char *frame_name);
   int socket() { return socket_; }
+  simgrid::xbt::DynarRange<s_mc_smx_process_info> simix_processes();
 
 private:
   void init_memory_map_info();