Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
c21a00bc2674eed8d58554650147f7502c404bd5
[simgrid.git] / src / mc / mc_base.h
1 /* Copyright (c) 2008-2014. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef MC_BASE_H
8 #define MC_BASE_H
9
10 #include <simgrid/simix.h>
11 #include "simgrid_config.h"
12 #include "internal_config.h"
13 #include "../simix/smx_private.h"
14
15 SG_BEGIN_DECL()
16
17 /** Check if the given simcall can be resolved
18  *
19  *  \return `TRUE` or `FALSE`
20  */
21 int MC_request_is_enabled(smx_simcall_t req);
22
23 /** Check if the given simcall is visible
24  *
25  *  \return `TRUE` or `FALSE`
26  */
27 int MC_request_is_visible(smx_simcall_t req);
28
29 /** Execute everything which is invisible
30  *
31  *  Execute all the processes that are ready to run and all invisible simcalls
32  *  iteratively until there doesn't remain any. At this point, the function
33  *  returns to the caller which can handle the visible (and ready) simcalls.
34  */
35 void MC_wait_for_requests(void);
36
37 extern double *mc_time;
38
39 SG_END_DECL()
40
41 #endif