Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Travis: actually get the packages I just made available
[simgrid.git] / src / mc / mc_smx.hpp
1 /* Copyright (c) 2015-2018. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_MC_SMX_HPP
7 #define SIMGRID_MC_SMX_HPP
8
9 #include "src/mc/remote/RemoteClient.hpp"
10
11 /** @file
12  *  @brief (Cross-process, MCer/MCed) Access to SMX structures
13  *
14  *  We copy some C data structure from the MCed process in the MCer process.
15  *  This is implemented by:
16  *
17  *   - `model_checker->process.smx_process_infos`
18  *      (copy of `simix_global->process_list`);
19  *
20  *   - `model_checker->process.smx_old_process_infos`
21  *      (copy of `simix_global->process_to_destroy`);
22  *
23  *   - `model_checker->hostnames`.
24  *
25  * The process lists are currently refreshed each time MCed code is executed.
26  * We don't try to give a persistent MCer address for a given MCed process.
27  * For this reason, a MCer simgrid::mc::Process* is currently not reusable after
28  * MCed code.
29  */
30
31 /** Get the issuer of  a simcall (`req->issuer`)
32  *
33  *  In split-process mode, it does the black magic necessary to get an address
34  *  of a (shallow) copy of the data structure the issuer SIMIX process in the local
35  *  address space.
36  *
37  *  @param process the MCed process
38  *  @param req     the simcall (copied in the local process)
39  */
40 XBT_PRIVATE smx_actor_t MC_smx_simcall_get_issuer(s_smx_simcall const* req);
41
42 XBT_PRIVATE const char* MC_smx_actor_get_name(smx_actor_t p);
43 XBT_PRIVATE const char* MC_smx_actor_get_host_name(smx_actor_t p);
44
45 XBT_PRIVATE int MC_smpi_process_count(void);
46
47 XBT_PRIVATE unsigned long MC_smx_get_maxpid(void);
48
49 #endif