Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / src / mc / mc_base.hpp
1 /* Copyright (c) 2008-2023. 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_BASE_HPP
7 #define SIMGRID_MC_BASE_HPP
8
9 #include "simgrid/forward.h"
10 #include <vector>
11
12 namespace simgrid::mc {
13
14 /** Execute everything which is invisible
15  *
16  *  Execute all the processes that are ready to run and all invisible simcalls
17  *  iteratively until there doesn't remain any. At this point, the function
18  *  returns to the caller which can handle the visible (and ready) simcalls.
19  */
20 XBT_PRIVATE void execute_actors();
21
22 XBT_PRIVATE extern std::vector<double> processes_time;
23
24 /** Execute a given simcall */
25 XBT_PRIVATE void handle_simcall(kernel::actor::Simcall* req, int req_num);
26
27 /** Is the process ready to execute its simcall?
28  *
29  *  This is true if the request associated with the process is ready.
30  *
31  *  Most requests are always enabled but WAIT and WAITANY
32  *  are not always enabled: a WAIT where the communication does not
33  *  have both a source and a destination yet is not enabled
34  *  (unless timeout is enabled in the wait and enabled in SimGridMC).
35  */
36 XBT_PRIVATE bool actor_is_enabled(kernel::actor::ActorImpl* process);
37
38 /** Check if the given simcall is visible */
39 XBT_PRIVATE bool request_is_visible(const kernel::actor::Simcall* req);
40 } // namespace simgrid::mc
41
42 #endif