]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/cgroup.h
cgroups: convert tasks file to use a seq_file with shared pid array
[linux-2.6-omap-h63xx.git] / include / linux / cgroup.h
index 7166023e07d26036f3164eca0b2c52cae7fdc5b8..8ab91880a0ad2f758882eadfba20e271ae0eb9a7 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/rcupdate.h>
 #include <linux/cgroupstats.h>
 #include <linux/prio_heap.h>
+#include <linux/rwsem.h>
 
 #ifdef CONFIG_CGROUPS
 
@@ -136,6 +137,15 @@ struct cgroup {
         * release_list_lock
         */
        struct list_head release_list;
+
+       /* pids_mutex protects the fields below */
+       struct rw_semaphore pids_mutex;
+       /* Array of process ids in the cgroup */
+       pid_t *tasks_pids;
+       /* How many files are using the current tasks_pids array */
+       int pids_use_count;
+       /* Length of the current tasks_pids array */
+       int pids_length;
 };
 
 /* A css_set is a structure holding pointers to a set of