1 /* Copyright (c) 2008-2015. The SimGrid Team.
2 * All rights reserved. */
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. */
7 #ifndef SIMGRID_MC_BASE_H
8 #define SIMGRID_MC_BASE_H
11 #include "src/simix/popping_private.h" // smx_simcall_t
15 /** Check if the given simcall can be resolved
17 * \return `TRUE` or `FALSE`
19 XBT_PRIVATE int MC_request_is_enabled(smx_simcall_t req);
21 /** Check if the given simcall is visible
23 * \return `TRUE` or `FALSE`
25 XBT_PRIVATE int MC_request_is_visible(smx_simcall_t req);
27 /** Execute everything which is invisible
29 * Execute all the processes that are ready to run and all invisible simcalls
30 * iteratively until there doesn't remain any. At this point, the function
31 * returns to the caller which can handle the visible (and ready) simcalls.
33 XBT_PRIVATE void MC_wait_for_requests(void);
35 XBT_PRIVATE extern double *mc_time;
37 /** Execute a given simcall */
38 XBT_PRIVATE void MC_simcall_handle(smx_simcall_t req, int value);