aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/cgroup.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index c833d6f23672..2357733a0a80 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -141,6 +141,17 @@ enum {
141 CGRP_WAIT_ON_RMDIR, 141 CGRP_WAIT_ON_RMDIR,
142}; 142};
143 143
144struct cgroup_pidlist {
145 /* protects the other fields */
146 struct rw_semaphore mutex;
147 /* array of xids */
148 pid_t *list;
149 /* how many elements the above list has */
150 int length;
151 /* how many files are using the current array */
152 int use_count;
153};
154
144struct cgroup { 155struct cgroup {
145 unsigned long flags; /* "unsigned long" so bitops work */ 156 unsigned long flags; /* "unsigned long" so bitops work */
146 157
@@ -179,14 +190,9 @@ struct cgroup {
179 */ 190 */
180 struct list_head release_list; 191 struct list_head release_list;
181 192
182 /* pids_mutex protects the fields below */ 193 /* we will have two separate pidlists, one for pids (the tasks file)
183 struct rw_semaphore pids_mutex; 194 * and one for tgids (the procs file). */
184 /* Array of process ids in the cgroup */ 195 struct cgroup_pidlist tasks, procs;
185 pid_t *tasks_pids;
186 /* How many files are using the current tasks_pids array */
187 int pids_use_count;
188 /* Length of the current tasks_pids array */
189 int pids_length;
190 196
191 /* For RCU-protected deletion */ 197 /* For RCU-protected deletion */
192 struct rcu_head rcu_head; 198 struct rcu_head rcu_head;