OSDN Git Service

posix-cpu-timers: Consolidate thread group sample code
authorThomas Gleixner <tglx@linutronix.de>
Wed, 21 Aug 2019 19:08:55 +0000 (21:08 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 28 Aug 2019 09:50:28 +0000 (11:50 +0200)
commit24ab7f5a7b2c917e89fc6a87252f18faff91d6ce
treef5d94160da053bd6b4bd0491845282b320236be7
parentc506bef424ca282f2ad357e86fee940c69018974
posix-cpu-timers: Consolidate thread group sample code

cpu_clock_sample_group() and cpu_timer_sample_group() are almost the
same. Before the rename one called thread_group_cputimer() and the other
thread_group_cputime(). Really intuitive function names.

Consolidate the functions and also avoid the thread traversal when
the thread group's accounting is already active.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lkml.kernel.org/r/20190821192919.960966884@linutronix.de
kernel/time/posix-cpu-timers.c