From: Roland McGrath It comes up as useful in debugging to be able to see task->thread_info->flags along with signal information and such. There is no way currently to elicit these bits from the kernel via sysrq or /proc (AFAIK). This patch adds the field to /proc/PID/status. Signed-off-by: Roland McGrath Signed-off-by: Andrew Morton --- 25-akpm/fs/proc/array.c | 7 +++++++ 1 files changed, 7 insertions(+) diff -puN fs/proc/array.c~show-thread_info-flags-in-proc-pid-status fs/proc/array.c --- 25/fs/proc/array.c~show-thread_info-flags-in-proc-pid-status Fri Apr 1 14:44:15 2005 +++ 25-akpm/fs/proc/array.c Fri Apr 1 14:44:15 2005 @@ -287,6 +287,12 @@ static inline char *task_cap(struct task cap_t(p->cap_effective)); } +static inline char *task_tif(struct task_struct *p, char *buffer) +{ + return buffer + sprintf(buffer, "ThreadInfoFlags:\t%lu\n", + (unsigned long) p->thread_info->flags); +} + int proc_pid_status(struct task_struct *task, char * buffer) { char * orig = buffer; @@ -294,6 +300,7 @@ int proc_pid_status(struct task_struct * buffer = task_name(task, buffer); buffer = task_state(task, buffer); + buffer = task_tif(task, buffer); if (mm) { buffer = task_mem(mm, buffer); _