posix-timers: Consolidate timer setup
authorThomas Gleixner <tglx@linutronix.de>
Mon, 10 Jun 2024 16:42:30 +0000 (18:42 +0200)
committerFrederic Weisbecker <frederic@kernel.org>
Mon, 29 Jul 2024 19:57:35 +0000 (21:57 +0200)
commit20f13385b5836d00d64698748565fc6d3ce9b419
tree45d5ee418da391c30c8bb7a5f86c7797c69e06f2
parent52dea0a15cc888e89f0144dca7b712fb56d12a28
posix-timers: Consolidate timer setup

hrtimer based and CPU timers have their own way to install the new interval
and to reset overrun and signal handling related data.

Create a helper function and do the same operation for all variants.

This also makes the handling of the interval consistent. It's only stored
when the timer is actually armed, i.e. timer->it_value != 0. Before that it
was stored unconditionally for posix CPU timers and conditionally for the
other posix timers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
kernel/time/posix-cpu-timers.c
kernel/time/posix-timers.c
kernel/time/posix-timers.h