john stultz 4614a696bd procfs: allow threads to rename siblings via /proc/pid/tasks/tid/comm
Setting a thread's comm to be something unique is a very useful ability
and is helpful for debugging complicated threaded applications.  However
currently the only way to set a thread name is for the thread to name
itself via the PR_SET_NAME prctl.

However, there may be situations where it would be advantageous for a
thread dispatcher to be naming the threads its managing, rather then
having the threads self-describe themselves.  This sort of behavior is
available on other systems via the pthread_setname_np() interface.

This patch exports a task's comm via proc/pid/comm and
proc/pid/task/tid/comm interfaces, and allows thread siblings to write to
these values.

[akpm@linux-foundation.org: cleanups]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Mike Fulton <fultonm@ca.ibm.com>
Cc: Sean Foley <Sean_Foley@ca.ibm.com>
Cc: Darren Hart <dvhltc@us.ibm.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-15 08:53:24 -08:00
..
2006-11-30 04:58:40 +01:00
2005-11-22 09:14:30 -08:00
2009-08-19 10:40:13 -07:00
2006-10-03 22:54:15 +02:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2009-06-06 10:28:14 -06:00
2006-10-03 22:47:42 +02:00
2007-10-22 08:13:21 -07:00
2006-12-30 10:56:45 -08:00
2009-05-19 10:23:23 +01:00
2009-05-19 10:23:23 +01:00
2005-04-16 15:20:36 -07:00
2007-07-31 15:39:38 -07:00
2007-05-09 08:58:15 +02:00
2009-11-20 10:05:52 +09:00
2008-09-02 19:21:37 -07:00
2009-11-13 15:45:01 -08:00
2008-07-26 12:00:05 -07:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-11-30 04:58:40 +01:00
2006-12-07 08:39:44 -08:00
2009-05-21 13:14:32 -07:00
2009-01-29 16:34:30 +02:00
2007-02-12 09:48:40 -08:00
2009-12-10 15:02:50 +01:00
2008-11-12 17:17:17 -08:00