diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-10-31 17:13:10 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-10-31 17:13:10 +0100 |
commit | 7b3b6e42032e94a6132a85642e95106f5346650e (patch) | |
tree | 8b2262291341d8a9f9b1e7e3c63a3289bb6c6de6 /include/linux/cgroup.h | |
parent | 04172c0b9ea5861e5cba7909da5297b3aedac9e1 (diff) | |
parent | 0173a3265b228da319ceb9c1ec6a5682fd1b2d92 (diff) | |
download | kernel-crypto-7b3b6e42032e94a6132a85642e95106f5346650e.tar.gz kernel-crypto-7b3b6e42032e94a6132a85642e95106f5346650e.tar.xz kernel-crypto-7b3b6e42032e94a6132a85642e95106f5346650e.zip |
Merge commit 'v2.6.28-rc2' into topic/asoc
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index c98dd7cb707..8b00f6643e9 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -9,12 +9,12 @@ */ #include <linux/sched.h> -#include <linux/kref.h> #include <linux/cpumask.h> #include <linux/nodemask.h> #include <linux/rcupdate.h> #include <linux/cgroupstats.h> #include <linux/prio_heap.h> +#include <linux/rwsem.h> #ifdef CONFIG_CGROUPS @@ -137,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 @@ -149,7 +158,7 @@ struct cgroup { struct css_set { /* Reference count */ - struct kref ref; + atomic_t refcount; /* * List running through all cgroup groups in the same hash @@ -326,7 +335,8 @@ struct cgroup_subsys { */ void (*mm_owner_changed)(struct cgroup_subsys *ss, struct cgroup *old, - struct cgroup *new); + struct cgroup *new, + struct task_struct *p); int subsys_id; int active; int disabled; @@ -393,6 +403,9 @@ void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it); int cgroup_scan_tasks(struct cgroup_scanner *scan); int cgroup_attach_task(struct cgroup *, struct task_struct *); +void cgroup_mm_owner_callbacks(struct task_struct *old, + struct task_struct *new); + #else /* !CONFIG_CGROUPS */ static inline int cgroup_init_early(void) { return 0; } @@ -411,15 +424,9 @@ static inline int cgroupstats_build(struct cgroupstats *stats, return -EINVAL; } +static inline void cgroup_mm_owner_callbacks(struct task_struct *old, + struct task_struct *new) {} + #endif /* !CONFIG_CGROUPS */ -#ifdef CONFIG_MM_OWNER -extern void -cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new); -#else /* !CONFIG_MM_OWNER */ -static inline void -cgroup_mm_owner_callbacks(struct task_struct *old, struct task_struct *new) -{ -} -#endif /* CONFIG_MM_OWNER */ #endif /* _LINUX_CGROUP_H */ |