trace: fix task state printout
authorThomas Gleixner <tglx@linutronix.de>
Wed, 17 Dec 2008 21:34:13 +0000 (22:34 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 18 Dec 2008 12:03:09 +0000 (13:03 +0100)
Impact: fix occasionally incorrect trace output

The tracing code has interesting varieties of printing out task state.

Unfortunalely only one of the instances is correct as it copies the
code from sched.c:sched_show_task(). The others are plain wrong as
they treatthe bitfield as an integer offset into the character
array. Also the size check of the character array is wrong as it
includes the trailing \0.

Use a common state decoder inline which does the Right Thing.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

No differences found