]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
posix-timers: Consolidate posix_cpu_clock_get()
authorFrederic Weisbecker <fweisbec@gmail.com>
Fri, 11 Oct 2013 15:41:11 +0000 (17:41 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Mon, 9 Dec 2013 15:53:51 +0000 (16:53 +0100)
commit33ab0fec33527e8b5ab124cff6aefd4746508e04
treeb2802de1741f3af7e76fa47402d82e903947bc5b
parentaf82eb3c3068877a6b1989796a06b846b1e9e1c3
posix-timers: Consolidate posix_cpu_clock_get()

Consolidate the clock sampling common code used for both local
and remote targets.

Note that this introduces a tiny user ABI change: if a
PID is passed to clock_gettime() along the clockid,
we used to forbid a process wide clock sample when that
PID doesn't belong to a group leader. Now after this patch
we allow process wide clock samples if that PID belongs to
the current task, even if the current task is not the
group leader.

But local process wide clock samples are allowed if PID == 0
(current task) even if the current task is not the group leader.
So in the end this should be no big deal as this actually harmonize
the behaviour when the remote sample is actually a local one.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kosaki Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
kernel/posix-cpu-timers.c