summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 10:22:11 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 10:22:11 -0800
commit661dd5c840851194c7ee5a2603d5354dcf9bd212 (patch)
treeae8698638f21deeca51c1522bb8ccfd6a7735770 /include
parent45bfe98bd790b5ded00462cd582effcfb42263cc (diff)
parentc9db4fa11526affde83603fe52595bd1260c1354 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/hrtimer-2.6
Diffstat (limited to 'include')
-rw-r--r--include/linux/hrtimer.h12
-rw-r--r--include/linux/ktime.h4
2 files changed, 6 insertions, 10 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index cf5cfdf8d613..089bfb1fa01a 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -49,8 +49,6 @@ struct hrtimer_base;
* struct hrtimer - the basic hrtimer structure
*
* @node: red black tree node for time ordered insertion
- * @list: list head for easier access to the time ordered list,
- * without walking the red black tree.
* @expires: the absolute expiry time in the hrtimers internal
* representation. The time is related to the clock on
* which the timer is based.
@@ -63,7 +61,6 @@ struct hrtimer_base;
*/
struct hrtimer {
struct rb_node node;
- struct list_head list;
ktime_t expires;
enum hrtimer_state state;
int (*function)(void *);
@@ -78,7 +75,7 @@ struct hrtimer {
* to a base on another cpu.
* @lock: lock protecting the base and associated timers
* @active: red black tree root node for the active timers
- * @pending: list of pending timers for simple time ordered access
+ * @first: pointer to the timer node which expires first
* @resolution: the resolution of the clock, in nanoseconds
* @get_time: function to retrieve the current time of the clock
* @curr_timer: the timer which is executing a callback right now
@@ -87,8 +84,8 @@ struct hrtimer_base {
clockid_t index;
spinlock_t lock;
struct rb_root active;
- struct list_head pending;
- unsigned long resolution;
+ struct rb_node *first;
+ ktime_t resolution;
ktime_t (*get_time)(void);
struct hrtimer *curr_timer;
};
@@ -125,8 +122,7 @@ static inline int hrtimer_active(const struct hrtimer *timer)
}
/* 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,
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 222a047cc145..1bd6552cc341 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -272,8 +272,8 @@ static inline u64 ktime_to_ns(const ktime_t kt)
* idea of the (in)accuracy of timers. Timer values are rounded up to
* this resolution values.
*/
-#define KTIME_REALTIME_RES (NSEC_PER_SEC/HZ)
-#define KTIME_MONOTONIC_RES (NSEC_PER_SEC/HZ)
+#define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC }
+#define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC }
/* Get the monotonic time in timespec format: */
extern void ktime_get_ts(struct timespec *ts);