Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove one layer of calls
[simgrid.git] / src / mc / mc_base.h
1 /* Copyright (c) 2008-2017. 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_H
7 #define SIMGRID_MC_BASE_H
8
9 #include "simgrid/forward.h"
10
11 #ifdef __cplusplus
12
13 #include <vector>
14
15 namespace simgrid {
16 namespace mc {
17
18 /** Execute everything which is invisible
19  *
20  *  Execute all the processes that are ready to run and all invisible simcalls
21  *  iteratively until there doesn't remain any. At this point, the function
22  *  returns to the caller which can handle the visible (and ready) simcalls.
23  */
24 XBT_PRIVATE void wait_for_requests();
25
26 XBT_PRIVATE extern std::vector<double> processes_time;
27
28 /** Execute a given simcall */
29 XBT_PRIVATE void handle_simcall(smx_simcall_t req, int req_num);
30
31 /** Check if the given simcall is visible
32  *
33  *  \return `TRUE` or `FALSE`
34  */
35 XBT_PRIVATE bool request_is_visible(smx_simcall_t req);
36
37 }
38 }
39
40 #endif
41
42 #endif