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