File: cgroup.h

package info (click to toggle)
fio 3.12-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 4,488 kB
  • sloc: ansic: 65,165; sh: 3,284; python: 1,978; makefile: 657; yacc: 204; lex: 184
file content (36 lines) | stat: -rw-r--r-- 674 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef FIO_CGROUP_H
#define FIO_CGROUP_H

#ifdef FIO_HAVE_CGROUPS

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,
			       struct cgroup_mnt **mnt)
{
	td_verror(td, EINVAL, "cgroup_setup");
	return 1;
}

static inline void cgroup_shutdown(struct thread_data *td, struct cgroup_mnt *mnt)
{
}

static inline void cgroup_kill(struct flist_head *list)
{
}

#endif
#endif