]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Fix Alt-SysRQ-T status, and comment
authorRussell King <rmk@arm.linux.org.uk>
Sat, 8 Feb 2003 18:37:37 +0000 (10:37 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sat, 8 Feb 2003 18:37:37 +0000 (10:37 -0800)
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

fs/proc/array.c
kernel/sched.c

index df1501a0f3326d1aa0b9e11b95445aa42a652bf8..5fe9bffbc8af452f53b19b256c0636bed02bb2c9 100644 (file)
@@ -126,8 +126,8 @@ static const char *task_state_array[] = {
        "R (running)",          /*  0 */
        "S (sleeping)",         /*  1 */
        "D (disk sleep)",       /*  2 */
-       "T (stopped)",          /*  8 */
-       "Z (zombie)",           /*  4 */
+       "T (stopped)",          /*  4 */
+       "Z (zombie)",           /*  8 */
        "X (dead)"              /* 16 */
 };
 
index 3e072580a24489328a672076cd5fe89c83932ecc..68bd00e54a812f2efcc4226cef31cc522a63bdbd 100644 (file)
@@ -2037,7 +2037,7 @@ static void show_task(task_t * p)
        unsigned long free = 0;
        task_t *relative;
        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);
        state = p->state ? __ffs(p->state) + 1 : 0;