Commit cdb4ec5d authored by Russell King's avatar Russell King Committed by Linus Torvalds

[PATCH] Fix Alt-SysRQ-T status, and comment

Fix wrong order of process status. It's

	#define TASK_RUNNING            0
	#define TASK_INTERRUPTIBLE      1
	#define TASK_UNINTERRUPTIBLE    2
	#define TASK_STOPPED            4
	#define TASK_ZOMBIE             8
	#define TASK_DEAD               16

but SysRQ printout routines switch stopped and zombie around.

So, for one more time, here's another mailing of the same patch to fix
this brokenness.  In addition, fix the wrong comment in fs/proc/array.c
parent 5654988e
...@@ -126,8 +126,8 @@ static const char *task_state_array[] = { ...@@ -126,8 +126,8 @@ static const char *task_state_array[] = {
"R (running)", /* 0 */ "R (running)", /* 0 */
"S (sleeping)", /* 1 */ "S (sleeping)", /* 1 */
"D (disk sleep)", /* 2 */ "D (disk sleep)", /* 2 */
"T (stopped)", /* 8 */ "T (stopped)", /* 4 */
"Z (zombie)", /* 4 */ "Z (zombie)", /* 8 */
"X (dead)" /* 16 */ "X (dead)" /* 16 */
}; };
......
...@@ -2037,7 +2037,7 @@ static void show_task(task_t * p) ...@@ -2037,7 +2037,7 @@ static void show_task(task_t * p)
unsigned long free = 0; unsigned long free = 0;
task_t *relative; task_t *relative;
int state; int state;
static const char * stat_nam[] = { "R", "S", "D", "Z", "T", "W" }; static const char * stat_nam[] = { "R", "S", "D", "T", "Z", "W" };
printk("%-13.13s ", p->comm); printk("%-13.13s ", p->comm);
state = p->state ? __ffs(p->state) + 1 : 0; state = p->state ? __ffs(p->state) + 1 : 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment