X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=arch%2Fpowerpc%2Fxmon%2Fxmon.c;h=da4d7f225a409bc03b0cf84a67fea7724833bed3;hb=019b3fd94ba73d3ac615f0537440b81f129821f6;hp=fe34c4fdd24ae24a1a37bfdb6b2197642871dc90;hpb=4ebbbaa4ce8524b853dd6febf0176a6efa3482d7;p=linux-2.6-block.git diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index fe34c4fdd24a..da4d7f225a40 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -3266,6 +3266,7 @@ memzcan(void) static void show_task(struct task_struct *volatile tsk) { + unsigned int p_state = READ_ONCE(tsk->__state); char state; /* @@ -3273,14 +3274,14 @@ static void show_task(struct task_struct *volatile tsk) * appropriate for calling from xmon. This could be moved * to a common, generic, routine used by both. */ - state = (tsk->state == 0) ? 'R' : - (tsk->state < 0) ? 'U' : - (tsk->state & TASK_UNINTERRUPTIBLE) ? 'D' : - (tsk->state & TASK_STOPPED) ? 'T' : - (tsk->state & TASK_TRACED) ? 'C' : + state = (p_state == 0) ? 'R' : + (p_state < 0) ? 'U' : + (p_state & TASK_UNINTERRUPTIBLE) ? 'D' : + (p_state & TASK_STOPPED) ? 'T' : + (p_state & TASK_TRACED) ? 'C' : (tsk->exit_state & EXIT_ZOMBIE) ? 'Z' : (tsk->exit_state & EXIT_DEAD) ? 'E' : - (tsk->state & TASK_INTERRUPTIBLE) ? 'S' : '?'; + (p_state & TASK_INTERRUPTIBLE) ? 'S' : '?'; printf("%16px %16lx %16px %6d %6d %c %2d %s\n", tsk, tsk->thread.ksp, tsk->thread.regs,