diff options
| author | Jaroslav Kysela <perex@perex.cz> | 2010-01-08 03:26:34 -0500 |
|---|---|---|
| committer | Jaroslav Kysela <perex@perex.cz> | 2010-01-08 03:26:34 -0500 |
| commit | 1cb4f624ea38361b6397966470f0a1bed5532483 (patch) | |
| tree | 418b05ddc854b09d64f7d5ee0c78875e42b5f151 /fs/proc/array.c | |
| parent | 444c1953d496d272208902ff7010dc70d1f887f0 (diff) | |
| parent | 2c1f1895ef2aa8f0e5497893eff71304aef332e1 (diff) | |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into fixes
Diffstat (limited to 'fs/proc/array.c')
| -rw-r--r-- | fs/proc/array.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 4badde179b18..f560325c444f 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
| @@ -134,13 +134,16 @@ static inline void task_name(struct seq_file *m, struct task_struct *p) | |||
| 134 | * simple bit tests. | 134 | * simple bit tests. |
| 135 | */ | 135 | */ |
| 136 | static const char *task_state_array[] = { | 136 | static const char *task_state_array[] = { |
| 137 | "R (running)", /* 0 */ | 137 | "R (running)", /* 0 */ |
| 138 | "S (sleeping)", /* 1 */ | 138 | "S (sleeping)", /* 1 */ |
| 139 | "D (disk sleep)", /* 2 */ | 139 | "D (disk sleep)", /* 2 */ |
| 140 | "T (stopped)", /* 4 */ | 140 | "T (stopped)", /* 4 */ |
| 141 | "T (tracing stop)", /* 8 */ | 141 | "t (tracing stop)", /* 8 */ |
| 142 | "Z (zombie)", /* 16 */ | 142 | "Z (zombie)", /* 16 */ |
| 143 | "X (dead)" /* 32 */ | 143 | "X (dead)", /* 32 */ |
| 144 | "x (dead)", /* 64 */ | ||
| 145 | "K (wakekill)", /* 128 */ | ||
| 146 | "W (waking)", /* 256 */ | ||
| 144 | }; | 147 | }; |
| 145 | 148 | ||
| 146 | static inline const char *get_task_state(struct task_struct *tsk) | 149 | static inline const char *get_task_state(struct task_struct *tsk) |
| @@ -148,6 +151,8 @@ static inline const char *get_task_state(struct task_struct *tsk) | |||
| 148 | unsigned int state = (tsk->state & TASK_REPORT) | tsk->exit_state; | 151 | unsigned int state = (tsk->state & TASK_REPORT) | tsk->exit_state; |
| 149 | const char **p = &task_state_array[0]; | 152 | const char **p = &task_state_array[0]; |
| 150 | 153 | ||
| 154 | BUILD_BUG_ON(1 + ilog2(TASK_STATE_MAX) != ARRAY_SIZE(task_state_array)); | ||
| 155 | |||
| 151 | while (state) { | 156 | while (state) { |
| 152 | p++; | 157 | p++; |
| 153 | state >>= 1; | 158 | state >>= 1; |
