kdb: Make KDB use the new is_idle_task() API
authorPaul E. McKenney <paul.mckenney@linaro.org>
Thu, 10 Nov 2011 23:59:58 +0000 (15:59 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Sun, 11 Dec 2011 18:31:52 +0000 (10:31 -0800)
Change from direct comparison of ->pid with zero to is_idle_task().

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jason Wessel <jason.wessel@windriver.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
kernel/debug/kdb/kdb_support.c

index 5532dd37aa864e111e3005a5c523b05d864093f0..7d6fb40d21885c0d5f087d87bc1191ba6c101a1d 100644 (file)
@@ -636,7 +636,7 @@ char kdb_task_state_char (const struct task_struct *p)
                (p->exit_state & EXIT_ZOMBIE) ? 'Z' :
                (p->exit_state & EXIT_DEAD) ? 'E' :
                (p->state & TASK_INTERRUPTIBLE) ? 'S' : '?';
-       if (p->pid == 0) {
+       if (is_idle_task(p)) {
                /* Idle task.  Is it really idle, apart from the kdb
                 * interrupt? */
                if (!kdb_task_has_cpu(p) || kgdb_info[cpu].irq_depth == 1) {