- // TODO, avoid to reload `&simix_global`, `simix_global`, `*simix_global`
-
- // simix_global_p = REMOTE(simix_global);
- smx_global_t simix_global_p;
- this->read_variable("simix_global", &simix_global_p, sizeof(simix_global_p));
-
- // simix_global = REMOTE(*simix_global)
- s_smx_global_t simix_global;
- this->read_bytes(&simix_global, sizeof(simix_global),
- remote(simix_global_p));
-
- MC_process_refresh_simix_process_list(
- this, this->smx_process_infos, simix_global.process_list);
- MC_process_refresh_simix_process_list(
- this, this->smx_old_process_infos, simix_global.process_to_destroy);
-
- this->cache_flags_ |= Process::cache_simix_processes;
-}
-
-}
-}
-
-/** Get the issuer of a simcall (`req->issuer`)
- *
- * In split-process mode, it does the black magic necessary to get an address
- * of a (shallow) copy of the data structure the issuer SIMIX process in the local
- * address space.
- *
- * @param process the MCed process
- * @param req the simcall (copied in the local process)
- */
-smx_process_t MC_smx_simcall_get_issuer(s_smx_simcall_t const* req)
-{
- xbt_assert(mc_model_checker != nullptr);
-
- // This is the address of the smx_process in the MCed process:
- auto address = simgrid::mc::remote(req->issuer);
-
- // Lookup by address:
- for (auto& p : mc_model_checker->process().simix_processes())
- if (p.address == address)
- return p.copy.getBuffer();
- for (auto& p : mc_model_checker->process().old_simix_processes())
- if (p.address == address)
- return p.copy.getBuffer();
-
- xbt_die("Issuer not found");
-}
-
-const char* MC_smx_process_get_host_name(smx_process_t p)
-{
- if (mc_model_checker == nullptr)
- return sg_host_get_name(p->host);
-
- simgrid::mc::Process* process = &mc_model_checker->process();
-
- /* HACK, Horrible hack to find the offset of the id in the simgrid::s4u::Host.
-
- Offsetof is not supported for non-POD types but this should
- work in pratice for the targets currently supported by the MC
- as long as we do not add funny features to the Host class
- (such as virtual base).