Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5e05ad7d4e3b11f935998882b5d9c3b257137f1b
Commit:     5e05ad7d4e3b11f935998882b5d9c3b257137f1b
Parent:     ed5d2cac114202fe2978a9cbcab8f5032796d538
Author:     Davide Libenzi <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:27:25 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:07 2008 -0800

    timerfd: introduce a new hrtimer_forward_now() function
    
    I think that advancing the timer against the timer's current "now" can be a
    pretty common usage, so, w/out exposing hrtimer's internals, we add a new
    hrtimer_forward_now() function.
    
    Signed-off-by: Davide Libenzi <[EMAIL PROTECTED]>
    Cc: Michael Kerrisk <[EMAIL PROTECTED]>
    Cc: Thomas Gleixner <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/hrtimer.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index f79dcba..3fed27c 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -304,6 +304,13 @@ static inline int hrtimer_is_queued(struct hrtimer *timer)
 extern unsigned long
 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
 
+/* Forward a hrtimer so it expires after the hrtimer's current now */
+static inline unsigned long hrtimer_forward_now(struct hrtimer *timer,
+                                               ktime_t interval)
+{
+       return hrtimer_forward(timer, timer->base->get_time(), interval);
+}
+
 /* Precise sleep: */
 extern long hrtimer_nanosleep(struct timespec *rqtp,
                              struct timespec *rmtp,
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to