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
..
2009-12-15 08:53:18 -08:00
2009-09-23 07:39:28 -07:00
2009-12-09 12:04:34 +02:00
2009-09-24 07:20:57 -07:00
2009-01-07 23:14:38 +08:00
2009-07-01 10:56:25 +02:00
2009-10-01 21:17:49 +02:00
2009-06-15 21:30:28 -07:00
2009-12-03 19:28:53 +01:00
2009-10-02 10:54:01 -07:00
2009-11-24 13:33:34 -05:00
2009-08-29 19:09:27 -07:00
2009-06-04 10:32:49 -06:00
2009-06-22 10:12:35 +01:00
2009-12-09 19:52:01 -08:00
2009-07-12 13:02:10 -07:00
2009-12-04 15:39:55 +01:00
2009-06-15 21:30:28 -07:00
2009-11-30 13:46:04 -08:00
2009-12-15 08:53:24 -08:00
2009-06-15 21:30:24 -07:00
2009-12-09 20:36:08 +01:00
2009-12-14 21:17:25 +01:00
2009-09-23 07:39:28 -07:00
2009-06-07 13:52:52 +02:00
2009-10-07 15:35:55 -07:00
2009-08-19 21:46:09 -07:00
2009-09-24 07:21:03 -07:00
2009-12-08 20:30:41 -08:00
2009-06-19 08:08:50 +02:00
2009-09-20 12:27:42 +02:00
2009-06-12 18:01:47 +02:00
2009-12-03 09:32:25 +02:00
2009-09-26 01:08:55 -04:00
2009-12-04 15:39:55 +01:00
2009-01-14 19:19:03 +01:00
2009-12-09 18:59:52 -08:00
2009-06-12 18:01:47 +02:00
2009-06-12 18:01:47 +02:00
2009-12-03 12:14:38 -08:00
2009-09-09 13:29:38 -07:00
2009-11-09 08:30:06 +01:00
2009-12-09 19:43:33 -08:00
2009-12-12 14:27:24 -08:00
2009-06-18 13:04:04 -07:00
2009-10-26 09:40:31 +01:00
2009-09-11 10:29:53 +02:00
2009-06-21 13:12:46 +02:00
2009-12-09 19:43:33 -08:00
2009-12-11 15:18:05 -08:00
2008-12-22 18:44:05 +09:00
2009-12-09 18:16:11 +01:00
2009-12-04 15:39:55 +01:00
2009-12-11 14:28:56 -08:00
2009-11-05 18:11:18 -05:00
2009-11-09 09:40:54 +01:00
2009-11-17 10:17:47 +01:00
2009-12-11 11:55:25 -08:00
2009-12-09 19:50:49 -08:00
2009-12-15 08:53:20 -08:00
2009-10-04 22:53:41 +02:00
2009-09-23 07:39:28 -07:00
2009-01-07 10:00:18 -08:00
2009-09-23 06:46:39 -07:00
2009-08-22 14:25:32 -07:00
2009-06-16 19:47:52 -07:00
2008-12-03 16:09:53 -07:00
2009-06-12 18:01:47 +02:00
2009-08-22 14:25:32 -07:00
2009-06-18 13:03:46 -07:00
2009-06-12 18:01:46 +02:00
2009-11-24 14:33:04 +11:00
2009-10-30 14:59:52 -07:00
2009-10-03 09:28:11 +02:00
2009-06-12 18:01:50 +02:00
2009-04-07 08:44:05 -07:00
2009-06-12 18:01:47 +02:00
2009-12-09 18:59:52 -08:00
2009-01-05 18:10:19 -07:00
2009-10-24 09:42:27 +08:00
2009-03-24 16:38:27 -07:00
2009-12-04 15:39:53 +01:00
2009-12-14 08:53:54 +01:00
2009-10-15 07:25:20 -06:00
2009-05-09 07:12:50 +02:00
2009-09-21 15:14:56 +02:00
2009-12-09 18:59:52 -08:00
2009-07-21 11:49:06 -07:00
2009-09-19 09:37:23 -07:00
2009-01-29 18:19:29 -08:00
2009-09-18 09:48:52 -07:00
2009-12-12 11:40:13 -08:00
2009-09-02 21:29:22 +10:00
2009-07-01 22:36:22 +02:00
2009-09-08 16:36:08 +01:00
2009-06-12 18:01:47 +02:00
2009-06-15 21:30:28 -07:00
2009-09-18 09:48:52 -07:00
2009-08-28 15:21:12 -04:00
2009-06-23 20:21:38 +01:00
2009-06-12 18:01:47 +02:00
2009-08-07 12:03:46 +02:00
2009-12-06 13:20:02 +01:00
2009-04-27 12:00:27 -07:00
2009-04-27 12:00:27 -07:00
2009-01-06 15:59:28 -08:00
2009-12-14 12:58:57 +11:00
2009-04-29 14:15:55 +02:00
2009-12-15 08:53:17 -08:00
2009-09-22 07:17:26 -07:00
2009-12-15 08:53:24 -08:00
2009-09-22 07:17:39 -07:00
2009-11-09 09:40:56 +01:00
2009-06-12 18:01:47 +02:00
2009-06-19 11:50:18 -04:00
2009-06-18 13:03:56 -07:00
2009-09-23 07:39:46 -07:00
2009-12-01 08:20:31 -08:00
2009-06-12 18:01:47 +02:00
2009-04-14 09:00:23 +10:00
2009-04-11 08:18:11 +02:00
2009-12-14 09:46:56 -08:00
2009-06-19 08:08:50 +02:00
2009-10-01 16:11:12 -07:00
2009-05-08 19:22:20 -07:00
2009-07-29 19:10:36 -07:00
2009-04-14 09:14:58 +10:00
2009-09-09 13:29:42 -07:00