Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Remote support for filling state->internal_comm
[simgrid.git] / src / mc / mc_request.h
1 /* Copyright (c) 2007-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 #include <simgrid_config.h>
8
9 #include "../simix/smx_private.h"
10
11 #ifndef MC_REQUEST_H
12 #define MC_REQUEST_H
13
14 SG_BEGIN_DECL()
15
16 int MC_request_depend(smx_simcall_t req1, smx_simcall_t req2);
17 char* MC_request_to_string(smx_simcall_t req, int value);
18 unsigned int MC_request_testany_fail(smx_simcall_t req);
19 /*int MC_waitany_is_enabled_by_comm(smx_req_t req, unsigned int comm);*/
20 int MC_request_is_visible(smx_simcall_t req);
21
22 /** Can this requests can be executed.
23  *
24  *  Most requests are always enabled but WAIT and WAITANY
25  *  are not always enabled: a WAIT where the communication does not
26  *  have both a source and a destination yet is not enabled
27  *  (unless timeout is enabled in the wait and enabeld in SimGridMC).
28  */
29 int MC_request_is_enabled(smx_simcall_t req);
30 int MC_request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx);
31
32 /** Is the process ready to execute its simcall?
33  *
34  *  This is true if the request associated with the process is ready.
35  */
36 int MC_process_is_enabled(smx_process_t process);
37
38 char *MC_request_get_dot_output(smx_simcall_t req, int value);
39
40 SG_END_DECL()
41
42 #endif