X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=cgroup.h;h=10313b7dbccf1e43f83016dc444856fc0dc7815a;hp=f7ad210dca003d0d72b240701b3ff848386231b2;hb=04ba61dfa67784d4dfcc22a2b3de7ede28e22e40;hpb=6adb38a1a1cbe95f7131815416c8bb31683c3f47 diff --git a/cgroup.h b/cgroup.h index f7ad210d..10313b7d 100644 --- a/cgroup.h +++ b/cgroup.h @@ -3,25 +3,32 @@ #ifdef FIO_HAVE_CGROUPS -int cgroup_setup(struct thread_data *, struct flist_head *, char **); -void cgroup_shutdown(struct thread_data *, char **); +struct cgroup_mnt { + char *path; + bool cgroup2; +}; + +int cgroup_setup(struct thread_data *, struct flist_head *, struct cgroup_mnt **); +void cgroup_shutdown(struct thread_data *, struct cgroup_mnt *); void cgroup_kill(struct flist_head *list); #else +struct cgroup_mnt; + static inline int cgroup_setup(struct thread_data *td, struct flist_head *list, - char **mnt) + struct cgroup_mnt **mnt) { td_verror(td, EINVAL, "cgroup_setup"); return 1; } -static inline void cgroup_shutdown(struct thread_data *td, char **mnt) +static inline void cgroup_shutdown(struct thread_data *td, struct cgroup_mnt *mnt) { } -void cgroup_kill(struct flist_head *list); +static inline void cgroup_kill(struct flist_head *list) { }