summaryrefslogtreecommitdiff
path: root/include/linux/timer.h
diff options
context:
space:
mode:
authorAnna-Maria Behnsen <anna-maria@linutronix.de>2024-02-21 12:05:33 +0300
committerThomas Gleixner <tglx@linutronix.de>2024-02-22 19:52:30 +0300
commit8e7e247f64a1e0fee430aba28d9108f7598eb237 (patch)
tree4ee3450bf1cf0bc1a1b80e15722b724cf4d42241 /include/linux/timer.h
parent73129cf4b69cd1aaa3dd5eb7900a9c349773f5ae (diff)
downloadlinux-8e7e247f64a1e0fee430aba28d9108f7598eb237.tar.xz
timers: Introduce add_timer() variants which modify timer flags
A timer might be used as a pinned timer (using add_timer_on()) and later on as non-pinned timer using add_timer(). When the "NOHZ timer pull at expiry model" is in place, the TIMER_PINNED flag is required to be used whenever a timer needs to expire on a dedicated CPU. Otherwise the flag must not be set if expiration on a dedicated CPU is not required. add_timer_on()'s behavior will be changed during the preparation patches for the "NOHZ timer pull at expiry model" to unconditionally set the TIMER_PINNED flag. To be able to clear/ set the flag when queueing a timer, two variants of add_timer() are introduced. This is a preparatory step and has no functional change. Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Frederic Weisbecker <frederic@kernel.org> Link: https://lore.kernel.org/r/20240221090548.36600-6-anna-maria@linutronix.de
Diffstat (limited to 'include/linux/timer.h')
-rw-r--r--include/linux/timer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h
index f18a2f1eb79e..2be8be6dd317 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -165,6 +165,8 @@ extern int timer_reduce(struct timer_list *timer, unsigned long expires);
#define NEXT_TIMER_MAX_DELTA ((1UL << 30) - 1)
extern void add_timer(struct timer_list *timer);
+extern void add_timer_local(struct timer_list *timer);
+extern void add_timer_global(struct timer_list *timer);
extern int try_to_del_timer_sync(struct timer_list *timer);
extern int timer_delete_sync(struct timer_list *timer);