X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=cgroup.h;h=10313b7dbccf1e43f83016dc444856fc0dc7815a;hp=b246ef8607d044f3f15e3a51ac9f8be7b6eefde3;hb=99952ca7747d2ec56b4ff4771ddfaa03fb0e8407;hpb=dae5341c3059273242598de2bc27cc9f18c627c1 diff --git a/cgroup.h b/cgroup.h index b246ef86..10313b7d 100644 --- a/cgroup.h +++ b/cgroup.h @@ -3,24 +3,32 @@ #ifdef FIO_HAVE_CGROUPS -int cgroup_setup(struct thread_data *td, struct flist_head *list); -void cgroup_shutdown(struct thread_data *td); +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 -static inline int cgroup_setup(struct thread_data *td, struct flist_head *list); +struct cgroup_mnt; + +static inline int cgroup_setup(struct thread_data *td, struct flist_head *list, + struct cgroup_mnt **mnt) { td_verror(td, EINVAL, "cgroup_setup"); return 1; } -static inline void cgroup_shutdown(struct thread_data *td) +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) { }