]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/hrtimer.h
[PATCH] unify pfn_to_page: x86_64 pfn_to_page
[linux-2.6-omap-h63xx.git] / include / linux / hrtimer.h
index 64e2754ca7342614c156e64d230573f29a5616eb..93830158348e711ad50bc921dec68dd34f649d17 100644 (file)
@@ -34,15 +34,7 @@ enum hrtimer_restart {
        HRTIMER_RESTART,
 };
 
-/*
- * Timer states:
- */
-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 */
-};
+#define HRTIMER_INACTIVE       ((void *)1UL)
 
 struct hrtimer_base;
 
@@ -53,9 +45,7 @@ struct hrtimer_base;
  * @expires:   the absolute expiry time in the hrtimers internal
  *             representation. The time is related to the clock on
  *             which the timer is based.
- * @state:     state of the timer
  * @function:  timer expiry callback function
- * @data:      argument for the callback function
  * @base:      pointer to the timer base (per cpu and per clock)
  *
  * The hrtimer structure must be initialized by init_hrtimer_#CLOCKTYPE()
@@ -63,9 +53,7 @@ struct hrtimer_base;
 struct hrtimer {
        struct rb_node          node;
        ktime_t                 expires;
-       enum hrtimer_state      state;
-       int                     (*function)(void *);
-       void                    *data;
+       int                     (*function)(struct hrtimer *);
        struct hrtimer_base     *base;
 };
 
@@ -126,11 +114,12 @@ extern ktime_t hrtimer_get_next_event(void);
 
 static inline int hrtimer_active(const struct hrtimer *timer)
 {
-       return timer->state == HRTIMER_PENDING;
+       return timer->node.rb_parent != HRTIMER_INACTIVE;
 }
 
 /* Forward a hrtimer so it expires after now: */
-extern unsigned long hrtimer_forward(struct hrtimer *timer, ktime_t interval);
+extern unsigned long
+hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
 
 /* Precise sleep: */
 extern long hrtimer_nanosleep(struct timespec *rqtp,