Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165658
b: refs/heads/master
c: 102a775
h: refs/heads/master
v: v3
  • Loading branch information
Ben Blum authored and Linus Torvalds committed Sep 24, 2009
1 parent 74ce0c2 commit abd23a0
Show file tree
Hide file tree
Showing 3 changed files with 187 additions and 115 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f3ff20862cfcb85500a2bb55ee64622bd59fd0c
refs/heads/master: 102a775e3647628727ae83a9a6abf0564c3ca7cb
22 changes: 14 additions & 8 deletions trunk/include/linux/cgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,17 @@ enum {
CGRP_WAIT_ON_RMDIR,
};

struct cgroup_pidlist {
/* protects the other fields */
struct rw_semaphore mutex;
/* array of xids */
pid_t *list;
/* how many elements the above list has */
int length;
/* how many files are using the current array */
int use_count;
};

struct cgroup {
unsigned long flags; /* "unsigned long" so bitops work */

Expand Down Expand Up @@ -179,14 +190,9 @@ struct cgroup {
*/
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;
/* we will have two separate pidlists, one for pids (the tasks file)
* and one for tgids (the procs file). */
struct cgroup_pidlist tasks, procs;

/* For RCU-protected deletion */
struct rcu_head rcu_head;
Expand Down
Loading

0 comments on commit abd23a0

Please sign in to comment.