]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
posix-timers: Handle the timer_[re]arm() return value
authorThomas Gleixner <tglx@kernel.org>
Wed, 8 Apr 2026 11:54:01 +0000 (13:54 +0200)
committerThomas Gleixner <tglx@kernel.org>
Fri, 1 May 2026 19:36:12 +0000 (21:36 +0200)
commitcfb7fe3fdd4ca1d37da1ed15a1897d4a27c47a8a
tree0df10623b12923494bda0a8f8b5c15c7fb1c48ff
parent6fdb2677a594ab38eade927919bbd4d9688bfa1c
posix-timers: Handle the timer_[re]arm() return value

The [re]arm callbacks will return true when the timer was queued and false
if it was already expired at enqueue time.

In both cases the call sites can trivially queue the signal right there,
when the timer was already expired. That avoids a full round trip through
the hrtimer interrupt.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260408114952.198028466@kernel.org
kernel/time/posix-timers.c