From: Steven Rostedt Date: Mon, 12 May 2008 19:20:41 +0000 (+0200) Subject: ftrace: make the task state char-string visible to all X-Git-Tag: v2.6.27-rc1~1102^2^2~1^2~157 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7c731e0a495e25e79dc1e9e68772a67a55721a65;p=linux-2.6-omap-h63xx.git ftrace: make the task state char-string visible to all 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 Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/include/linux/sched.h b/include/linux/sched.h index 717cab8a0c8..6e26f1fdbfe 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -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 diff --git a/kernel/sched.c b/kernel/sched.c index 463dcdb36ef..73e60085236 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -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) {