treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / tools / perf / util / cgroup.h
blob2ec11f01090d6e38f3afafcb9005ae8d2d761b99
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __CGROUP_H__
3 #define __CGROUP_H__
5 #include <linux/refcount.h>
7 struct option;
9 struct cgroup {
10 char *name;
11 int fd;
12 refcount_t refcnt;
16 extern int nr_cgroups; /* number of explicit cgroups defined */
18 struct cgroup *cgroup__get(struct cgroup *cgroup);
19 void cgroup__put(struct cgroup *cgroup);
21 struct evlist;
23 struct cgroup *evlist__findnew_cgroup(struct evlist *evlist, const char *name);
25 void evlist__set_default_cgroup(struct evlist *evlist, struct cgroup *cgroup);
27 int parse_cgroups(const struct option *opt, const char *str, int unset);
29 #endif /* __CGROUP_H__ */