| 1 | #ifndef FIO_CGROUP_H |
| 2 | #define FIO_CGROUP_H |
| 3 | |
| 4 | #ifdef FIO_HAVE_CGROUPS |
| 5 | |
| 6 | struct cgroup_mnt { |
| 7 | char *path; |
| 8 | bool cgroup2; |
| 9 | }; |
| 10 | |
| 11 | int cgroup_setup(struct thread_data *, struct flist_head *, struct cgroup_mnt **); |
| 12 | void cgroup_shutdown(struct thread_data *, struct cgroup_mnt *); |
| 13 | |
| 14 | void cgroup_kill(struct flist_head *list); |
| 15 | |
| 16 | #else |
| 17 | |
| 18 | struct cgroup_mnt; |
| 19 | |
| 20 | static inline int cgroup_setup(struct thread_data *td, struct flist_head *list, |
| 21 | struct cgroup_mnt **mnt) |
| 22 | { |
| 23 | td_verror(td, EINVAL, "cgroup_setup"); |
| 24 | return 1; |
| 25 | } |
| 26 | |
| 27 | static inline void cgroup_shutdown(struct thread_data *td, struct cgroup_mnt *mnt) |
| 28 | { |
| 29 | } |
| 30 | |
| 31 | static inline void cgroup_kill(struct flist_head *list) |
| 32 | { |
| 33 | } |
| 34 | |
| 35 | #endif |
| 36 | #endif |