1 /* Copyright (c) 2018-2022. The SimGrid Team. All rights reserved. */
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. */
6 #ifndef INCLUDE_SIMGRID_EXEC_H_
7 #define INCLUDE_SIMGRID_EXEC_H_
9 #include <simgrid/forward.h>
10 #include <sys/types.h> /* ssize_t */
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);
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);
32 #endif /* INCLUDE_SIMGRID_EXEC_H_ */