]> err.no Git - linux-2.6/blobdiff - include/linux/hrtimer.h
Merge with git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[linux-2.6] / include / linux / hrtimer.h
index 98c5c1537b5d7e1c94924401d1476a548324e752..6401c31d6add4e2025a4ca7bf72d7290ed4b34c1 100644 (file)
@@ -40,6 +40,7 @@ enum hrtimer_restart {
 enum hrtimer_state {
        HRTIMER_INACTIVE,       /* Timer is inactive */
        HRTIMER_EXPIRED,                /* Timer is expired */
+       HRTIMER_RUNNING,                /* Timer is running the callback function */
        HRTIMER_PENDING,                /* Timer is pending */
 };
 
@@ -100,9 +101,8 @@ struct hrtimer_base {
 /* Exported timer functions: */
 
 /* Initialize timers: */
-extern void hrtimer_init(struct hrtimer *timer, const clockid_t which_clock);
-extern void hrtimer_rebase(struct hrtimer *timer, const clockid_t which_clock);
-
+extern void hrtimer_init(struct hrtimer *timer, clockid_t which_clock,
+                        enum hrtimer_mode mode);
 
 /* Basic timer operations: */
 extern int hrtimer_start(struct hrtimer *timer, ktime_t tim,
@@ -116,14 +116,17 @@ extern int hrtimer_try_to_cancel(struct hrtimer *timer);
 extern ktime_t hrtimer_get_remaining(const struct hrtimer *timer);
 extern int hrtimer_get_res(const clockid_t which_clock, struct timespec *tp);
 
+#ifdef CONFIG_NO_IDLE_HZ
+extern ktime_t hrtimer_get_next_event(void);
+#endif
+
 static inline int hrtimer_active(const struct hrtimer *timer)
 {
        return timer->state == HRTIMER_PENDING;
 }
 
 /* Forward a hrtimer so it expires after now: */
-extern unsigned long hrtimer_forward(struct hrtimer *timer,
-                                    const ktime_t interval);
+extern unsigned long hrtimer_forward(struct hrtimer *timer, ktime_t interval);
 
 /* Precise sleep: */
 extern long hrtimer_nanosleep(struct timespec *rqtp,