aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time/tick-sched.c
diff options
context:
space:
mode:
authorAnna-Maria Behnsen <anna-maria@linutronix.de>2024-01-23 17:46:57 +0100
committerThomas Gleixner <tglx@linutronix.de>2024-02-19 09:38:00 +0100
commitf365d05506150398fe6b035918d6fd8b62f35b9f (patch)
tree69d4710b87579d63f632bdb17fff6d786be2634c /kernel/time/tick-sched.c
parentca2768bbf5c48d8c048877dfbceafcebc3f06fa6 (diff)
downloadlinux-f365d05506150398fe6b035918d6fd8b62f35b9f.tar.gz
tick/sched: Add function description for tick_nohz_next_event()
The return value of tick_nohz_next_event() is not obvious at the first glance. Add a kernel-doc compatible function description which also covers return values. Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20240123164702.55612-4-anna-maria@linutronix.de
Diffstat (limited to 'kernel/time/tick-sched.c')
-rw-r--r--kernel/time/tick-sched.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 01fb50c1b17e4f..7c9efe3d9d5620 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -799,6 +799,16 @@ static inline bool local_timer_softirq_pending(void)
return local_softirq_pending() & BIT(TIMER_SOFTIRQ);
}
+/**
+ * tick_nohz_next_event() - return the clock monotonic based next event
+ * @ts: pointer to tick_sched struct
+ * @cpu: CPU number
+ *
+ * Return:
+ * *%0 - When the next event is a maximum of TICK_NSEC in the future
+ * and the tick is not stopped yet
+ * *%next_event - Next event based on clock monotonic
+ */
static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu)
{
u64 basemono, next_tick, delta, expires;