diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cgroup.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 60735dcf42..e2dd44f68f 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
| @@ -144,6 +144,16 @@ int cgroup_is_removed(const struct cgroup *cont); | |||
| 144 | 144 | ||
| 145 | int cgroup_path(const struct cgroup *cont, char *buf, int buflen); | 145 | int cgroup_path(const struct cgroup *cont, char *buf, int buflen); |
| 146 | 146 | ||
| 147 | int __cgroup_task_count(const struct cgroup *cont); | ||
| 148 | static inline int cgroup_task_count(const struct cgroup *cont) | ||
| 149 | { | ||
| 150 | int task_count; | ||
| 151 | rcu_read_lock(); | ||
| 152 | task_count = __cgroup_task_count(cont); | ||
| 153 | rcu_read_unlock(); | ||
| 154 | return task_count; | ||
| 155 | } | ||
| 156 | |||
| 147 | /* Return true if the cgroup is a descendant of the current cgroup */ | 157 | /* Return true if the cgroup is a descendant of the current cgroup */ |
| 148 | int cgroup_is_descendant(const struct cgroup *cont); | 158 | int cgroup_is_descendant(const struct cgroup *cont); |
| 149 | 159 | ||
