]> www.infradead.org Git - users/jedix/linux-maple.git/commit
timers: Move *sleep*() and timeout functions into a separate file
authorAnna-Maria Behnsen <anna-maria@linutronix.de>
Mon, 14 Oct 2024 08:22:19 +0000 (10:22 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 15 Oct 2024 22:36:46 +0000 (00:36 +0200)
commitda7bd0a9e0fce9f293b6e30c003f8f3978cee923
treef5f82477ddd8e040a0c1901da2fe2a3ba99399bf
parent3a2e83d350950a84dddb0094c92e380f31fd5333
timers: Move *sleep*() and timeout functions into a separate file

All schedule_timeout() and *sleep*() related functions are interfaces on
top of timer list timers and hrtimers to add a sleep to the code. As they
are built on top of the timer list timers and hrtimers, the [hr]timer
interfaces are already used except when queuing the timer in
schedule_timeout(). But there exists the appropriate interface add_timer()
which does the same job with an extra check for an already pending timer.

Split all those functions as they are into a separate file and use
add_timer() instead of __mod_timer() in schedule_timeout().

While at it fix minor formatting issues and a multi line printk function
call in schedule_timeout().

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/all/20241014-devel-anna-maria-b4-timers-flseep-v3-2-dc8b907cb62f@linutronix.de
MAINTAINERS
kernel/time/Makefile
kernel/time/hrtimer.c
kernel/time/sleep_timeout.c [new file with mode: 0644]
kernel/time/timer.c