]> err.no Git - linux-2.6/commitdiff
ftrace: make the task state char-string visible to all
authorSteven Rostedt <srostedt@redhat.com>
Mon, 12 May 2008 19:20:41 +0000 (21:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 23 May 2008 18:31:05 +0000 (20:31 +0200)
The tracer wants to be able to convert the state number
into a user visible character. This patch pulls that conversion
string out the scheduler into the header. This way if it were to
ever change, other parts of the kernel will know.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/sched.h
kernel/sched.c

index 717cab8a0c835867137bf33f6b6e5090d562fc2f..6e26f1fdbfe23f48c15019c61e6f16a22d728571 100644 (file)
@@ -2237,6 +2237,8 @@ static inline void mm_init_owner(struct mm_struct *mm, struct task_struct *p)
 }
 #endif /* CONFIG_MM_OWNER */
 
+#define TASK_STATE_TO_CHAR_STR "RSDTtZX"
+
 #endif /* __KERNEL__ */
 
 #endif
index 463dcdb36ef82007b3f21343da219aab575e1f09..73e60085236503703717ceb99bb8eb7c9ba63ab7 100644 (file)
@@ -5729,7 +5729,7 @@ out_unlock:
        return retval;
 }
 
-static const char stat_nam[] = "RSDTtZX";
+static const char stat_nam[] = TASK_STATE_TO_CHAR_STR;
 
 void sched_show_task(struct task_struct *p)
 {