posix-timers: Introduce /proc/PID/timers file
authorPavel Emelyanov <xemul@parallels.com>
Mon, 11 Mar 2013 09:12:45 +0000 (13:12 +0400)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 17 Apr 2013 18:51:01 +0000 (20:51 +0200)
commit48f6a7a511ef8823fdff39afee0320092d43a8a0
tree0ecdea997c4cbf8a5b8f76eed1bbb06fc4661c2b
parent5ed67f05f66c41e39880a6d61358438a25f9fee5
posix-timers: Introduce /proc/PID/timers file

Currently kernel doesn't provide any API for getting info about what
posix timers are configured by processes. It's implied, that a process
which configured some timers, knows what it did. However, for external
tools it's impossible to get this information. In particular, this is
critical for checkpoint-restore project to have this info.

Introduce a per-pid proc file with information about posix
timers. Since these timers are shared between threads, this file is
present on tgid level only, no such thing in tid subdirs.

The file format is expected to be the "/proc/<pid>/smaps"-like,
i.e. each timer will occupy seveal lines to allow for future
extending.

Each new timer entry starts with the

ID: <number>

line which is added by this patch.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Matthew Helsley <matt.helsley@gmail.com>
Link: http://lkml.kernel.org/r/513DA00D.6070009@parallels.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
fs/proc/base.c