]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/hrtimer.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
[linux-2.6-omap-h63xx.git] / include / linux / hrtimer.h
index 540799bc85f864ad7569b50804ac7843ccdbe750..f79dcba4b2c1861e4ab3148f0b9bcb2c5feb613b 100644 (file)
@@ -115,10 +115,8 @@ struct hrtimer {
        enum hrtimer_restart            (*function)(struct hrtimer *);
        struct hrtimer_clock_base       *base;
        unsigned long                   state;
-#ifdef CONFIG_HIGH_RES_TIMERS
        enum hrtimer_cb_mode            cb_mode;
        struct list_head                cb_entry;
-#endif
 #ifdef CONFIG_TIMER_STATS
        void                            *start_site;
        char                            start_comm[16];
@@ -149,7 +147,6 @@ struct hrtimer_sleeper {
  * @get_time:          function to retrieve the current time of the clock
  * @get_softirq_time:  function to retrieve the current time from the softirq
  * @softirq_time:      the time when running the hrtimer queue in the softirq
- * @cb_pending:                list of timers where the callback is pending
  * @offset:            offset of this clock to the monotonic base
  * @reprogram:         function to reprogram the timer event
  */
@@ -194,10 +191,10 @@ struct hrtimer_cpu_base {
        spinlock_t                      lock;
        struct lock_class_key           lock_key;
        struct hrtimer_clock_base       clock_base[HRTIMER_MAX_CLOCK_BASES];
+       struct list_head                cb_pending;
 #ifdef CONFIG_HIGH_RES_TIMERS
        ktime_t                         expires_next;
        int                             hres_active;
-       struct list_head                cb_pending;
        unsigned long                   nr_events;
 #endif
 };
@@ -217,6 +214,11 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer)
        return timer->base->get_time();
 }
 
+static inline int hrtimer_is_hres_active(struct hrtimer *timer)
+{
+       return timer->base->cpu_base->hres_active;
+}
+
 /*
  * The resolution of the clocks. The resolution value is returned in
  * the clock_getres() system call to give application programmers an
@@ -248,6 +250,10 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer)
        return timer->base->softirq_time;
 }
 
+static inline int hrtimer_is_hres_active(struct hrtimer *timer)
+{
+       return 0;
+}
 #endif
 
 extern ktime_t ktime_get(void);
@@ -300,7 +306,7 @@ hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
 
 /* Precise sleep: */
 extern long hrtimer_nanosleep(struct timespec *rqtp,
-                             struct timespec __user *rmtp,
+                             struct timespec *rmtp,
                              const enum hrtimer_mode mode,
                              const clockid_t clockid);
 extern long hrtimer_nanosleep_restart(struct restart_block *restart_block);
@@ -310,6 +316,7 @@ extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
 
 /* Soft interrupt function to run the hrtimer queues: */
 extern void hrtimer_run_queues(void);
+extern void hrtimer_run_pending(void);
 
 /* Bootup initialization: */
 extern void __init hrtimers_init(void);