Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of git+ssh://scm.gforge.inria.fr//gitroot/simgrid/simgrid
[simgrid.git] / src / mc / mc_smx.h
index c9cdd7a..c078cca 100644 (file)
@@ -9,13 +9,15 @@
 
 #include <stddef.h>
 
+#include <xbt/base.h>
 #include <xbt/log.h>
+
 #include <simgrid/simix.h>
 
-#include "smpi/private.h"
+#include "src/smpi/private.h"
 
-#include "mc_process.h"
-#include "mc_protocol.h"
+#include "src/mc/Process.hpp"
+#include "src/mc/remote/mc_protocol.h"
 
 /** @file
  *  @brief (Cross-process, MCer/MCed) Access to SMX structures
 
 SG_BEGIN_DECL()
 
-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;
-};
-
-XBT_INTERNAL xbt_dynar_t MC_smx_process_info_list_new(void);
-
-XBT_INTERNAL void MC_process_smx_refresh(simgrid::mc::Process* process);
-
 /** Get the issuer of  a simcall (`req->issuer`)
  *
  *  In split-process mode, it does the black magic necessary to get an address
@@ -62,41 +50,14 @@ XBT_INTERNAL void MC_process_smx_refresh(simgrid::mc::Process* process);
  *  @param process the MCed process
  *  @param req     the simcall (copied in the local process)
  */
-XBT_INTERNAL smx_process_t MC_smx_simcall_get_issuer(smx_simcall_t req);
-
-XBT_INTERNAL const char* MC_smx_process_get_name(smx_process_t p);
-XBT_INTERNAL const char* MC_smx_process_get_host_name(smx_process_t p);
-
-#define MC_EACH_SIMIX_PROCESS(process, code) \
-  if (mc_mode == MC_MODE_CLIENT) { \
-    xbt_swag_foreach(process, simix_global->process_list) { \
-      code; \
-    } \
-  } else { \
-    MC_process_smx_refresh(&mc_model_checker->process()); \
-    unsigned int _smx_process_index; \
-    mc_smx_process_info_t _smx_process_info; \
-    xbt_dynar_foreach_ptr(mc_model_checker->process().smx_process_infos, _smx_process_index, _smx_process_info) { \
-      smx_process_t process = &_smx_process_info->copy; \
-      code; \
-    } \
-  }
-
-/** Execute a given simcall */
-XBT_INTERNAL void MC_simcall_handle(smx_simcall_t req, int value);
-
-XBT_INTERNAL int MC_smpi_process_count(void);
-
-
-/* ***** Resolve (local/MCer structure from remote/MCed addresses) ***** */
+XBT_PRIVATE smx_actor_t MC_smx_simcall_get_issuer(s_smx_simcall_t const* req);
 
-/** Get a local copy of the process from the process remote address */
-XBT_INTERNAL smx_process_t MC_smx_resolve_process(smx_process_t process_remote_address);
+XBT_PRIVATE const char* MC_smx_actor_get_name(smx_actor_t p);
+XBT_PRIVATE const char* MC_smx_actor_get_host_name(smx_actor_t p);
 
-/** Get the process info structure from the process remote address */
-XBT_INTERNAL mc_smx_process_info_t MC_smx_resolve_process_info(smx_process_t process_remote_address);
+XBT_PRIVATE int MC_smpi_process_count(void);
 
-XBT_INTERNAL unsigned long MC_smx_get_maxpid(void);
+XBT_PRIVATE unsigned long MC_smx_get_maxpid(void);
 
 SG_END_DECL()