diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2024-11-05 09:14:55 +0100 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-11-07 02:14:45 +0100 |
commit | 7a66f72b09bb0762360274b1fb677b3433dbaa06 (patch) | |
tree | 40db7c7fcd8a96cecc73c3296e28612ac6f2786f /kernel/time/posix-cpu-timers.c | |
parent | df7a996b4dab03c889fa86d849447b716f07b069 (diff) | |
download | linux-7a66f72b09bb0762360274b1fb677b3433dbaa06.tar.gz linux-7a66f72b09bb0762360274b1fb677b3433dbaa06.tar.bz2 linux-7a66f72b09bb0762360274b1fb677b3433dbaa06.zip |
posix-timers: Cleanup SIG_IGN workaround leftovers
Now that ignored posix timer signals are requeued and the timers are
rearmed on signal delivery the workaround to keep such timers alive and
self rearm them is not longer required.
Remove the relevant hacks and the not longer required return values from
the related functions. The alarm timer workarounds will be cleaned up in a
separate step.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/all/20241105064214.187239060@linutronix.de
Diffstat (limited to 'kernel/time/posix-cpu-timers.c')
-rw-r--r-- | kernel/time/posix-cpu-timers.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c index 0c441d8c2604..50e8d04ab661 100644 --- a/kernel/time/posix-cpu-timers.c +++ b/kernel/time/posix-cpu-timers.c @@ -603,21 +603,11 @@ static void cpu_timer_fire(struct k_itimer *timer) */ wake_up_process(timer->it_process); cpu_timer_setexpires(ctmr, 0); - } else if (!timer->it_interval) { - /* - * One-shot timer. Clear it as soon as it's fired. - */ + } else { posix_timer_queue_signal(timer); - cpu_timer_setexpires(ctmr, 0); - } else if (posix_timer_queue_signal(timer)) { - /* - * The signal did not get queued because the signal - * was ignored, so we won't get any callback to - * reload the timer. But we need to keep it - * ticking in case the signal is deliverable next time. - */ - posix_cpu_timer_rearm(timer); - ++timer->it_signal_seq; + /* Disable oneshot timers */ + if (!timer->it_interval) + cpu_timer_setexpires(ctmr, 0); } } |