Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'wifi_rate_zero' into 'master'
[simgrid.git] / include / simgrid / exec.h
1 /* Copyright (c) 2018-2022. 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 INCLUDE_SIMGRID_EXEC_H_
7 #define INCLUDE_SIMGRID_EXEC_H_
8
9 #include <simgrid/forward.h>
10 #include <sys/types.h> /* ssize_t */
11
12 /* C interface */
13 SG_BEGIN_DECL
14
15 XBT_PUBLIC void sg_exec_set_bound(sg_exec_t exec, double bound);
16 XBT_PUBLIC const char* sg_exec_get_name(const_sg_exec_t exec);
17 XBT_PUBLIC void sg_exec_set_name(sg_exec_t exec, const char* name);
18 XBT_PUBLIC void sg_exec_set_host(sg_exec_t exec, sg_host_t new_host);
19 XBT_PUBLIC double sg_exec_get_remaining(const_sg_exec_t exec);
20 XBT_PUBLIC double sg_exec_get_remaining_ratio(const_sg_exec_t exec);
21
22 XBT_PUBLIC void sg_exec_start(sg_exec_t exec);
23 XBT_PUBLIC void sg_exec_cancel(sg_exec_t exec);
24 XBT_PUBLIC int sg_exec_test(sg_exec_t exec);
25 XBT_PUBLIC sg_error_t sg_exec_wait(sg_exec_t exec);
26 XBT_PUBLIC sg_error_t sg_exec_wait_for(sg_exec_t exec, double timeout);
27 XBT_PUBLIC ssize_t sg_exec_wait_any_for(sg_exec_t* execs, size_t count, double timeout);
28 XBT_PUBLIC ssize_t sg_exec_wait_any(sg_exec_t* execs, size_t count);
29
30 SG_END_DECL
31
32 #endif /* INCLUDE_SIMGRID_EXEC_H_ */