patch-2.1.117 linux/kernel/sched.c
Next file: linux/kernel/signal.c
Previous file: linux/kernel/fork.c
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Wed Aug 19 14:52:23 1998
- Orig file:
v2.1.116/linux/kernel/sched.c
- Orig date:
Thu Aug 6 14:06:34 1998
diff -u --recursive --new-file v2.1.116/linux/kernel/sched.c linux/kernel/sched.c
@@ -1588,11 +1588,13 @@
static void show_task(int nr,struct task_struct * p)
{
unsigned long free = 0;
+ int state;
static const char * stat_nam[] = { "R", "S", "D", "Z", "T", "W" };
printk("%-8s %3d ", p->comm, (p == current) ? -nr : nr);
- if (((unsigned) p->state) < sizeof(stat_nam)/sizeof(char *))
- printk(stat_nam[p->state]);
+ state = p->state ? ffz(~p->state) + 1 : 0;
+ if (((unsigned) state) < sizeof(stat_nam)/sizeof(char *))
+ printk(stat_nam[state]);
else
printk(" ");
#if (BITS_PER_LONG == 32)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov