summaryrefslogtreecommitdiffstats
path: root/include/linux/hrtimer.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-04-13 17:02:22 -0400
committerThomas Gleixner <tglx@linutronix.de>2015-04-22 11:06:48 -0400
commit91e5a2170e795989da9f90c18ba18984f23acc5b (patch)
treea0aba8e79eeefaf6a05982a97b11904fbbc4105c /include/linux/hrtimer.h
parent51a03393bac061a4e13fd17214d3ef93a5b296e3 (diff)
hrtimer: Document hrtimer_forward[_now]() proper
Document the calling context conditions. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20150413210035.178751779@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r--include/linux/hrtimer.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 05f6df1fdf5b..7770676c387a 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -418,7 +418,22 @@ static inline int hrtimer_callback_running(struct hrtimer *timer)
418extern u64 418extern u64
419hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval); 419hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
420 420
421/* Forward a hrtimer so it expires after the hrtimer's current now */ 421/**
422 * hrtimer_forward_now - forward the timer expiry so it expires after now
423 * @timer: hrtimer to forward
424 * @interval: the interval to forward
425 *
426 * Forward the timer expiry so it will expire after the current time
427 * of the hrtimer clock base. Returns the number of overruns.
428 *
429 * Can be safely called from the callback function of @timer. If
430 * called from other contexts @timer must neither be enqueued nor
431 * running the callback and the caller needs to take care of
432 * serialization.
433 *
434 * Note: This only updates the timer expiry value and does not requeue
435 * the timer.
436 */
422static inline u64 hrtimer_forward_now(struct hrtimer *timer, 437static inline u64 hrtimer_forward_now(struct hrtimer *timer,
423 ktime_t interval) 438 ktime_t interval)
424{ 439{