diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 13:22:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-12 13:22:11 -0500 |
commit | 661dd5c840851194c7ee5a2603d5354dcf9bd212 (patch) | |
tree | ae8698638f21deeca51c1522bb8ccfd6a7735770 /include/linux | |
parent | 45bfe98bd790b5ded00462cd582effcfb42263cc (diff) | |
parent | c9db4fa11526affde83603fe52595bd1260c1354 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/hrtimer-2.6
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/hrtimer.h | 12 | ||||
-rw-r--r-- | include/linux/ktime.h | 4 |
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; | |||
49 | * struct hrtimer - the basic hrtimer structure | 49 | * struct hrtimer - the basic hrtimer structure |
50 | * | 50 | * |
51 | * @node: red black tree node for time ordered insertion | 51 | * @node: red black tree node for time ordered insertion |
52 | * @list: list head for easier access to the time ordered list, | ||
53 | * without walking the red black tree. | ||
54 | * @expires: the absolute expiry time in the hrtimers internal | 52 | * @expires: the absolute expiry time in the hrtimers internal |
55 | * representation. The time is related to the clock on | 53 | * representation. The time is related to the clock on |
56 | * which the timer is based. | 54 | * which the timer is based. |
@@ -63,7 +61,6 @@ struct hrtimer_base; | |||
63 | */ | 61 | */ |
64 | struct hrtimer { | 62 | struct hrtimer { |
65 | struct rb_node node; | 63 | struct rb_node node; |
66 | struct list_head list; | ||
67 | ktime_t expires; | 64 | ktime_t expires; |
68 | enum hrtimer_state state; | 65 | enum hrtimer_state state; |
69 | int (*function)(void *); | 66 | int (*function)(void *); |
@@ -78,7 +75,7 @@ struct hrtimer { | |||
78 | * to a base on another cpu. | 75 | * to a base on another cpu. |
79 | * @lock: lock protecting the base and associated timers | 76 | * @lock: lock protecting the base and associated timers |
80 | * @active: red black tree root node for the active timers | 77 | * @active: red black tree root node for the active timers |
81 | * @pending: list of pending timers for simple time ordered access | 78 | * @first: pointer to the timer node which expires first |
82 | * @resolution: the resolution of the clock, in nanoseconds | 79 | * @resolution: the resolution of the clock, in nanoseconds |
83 | * @get_time: function to retrieve the current time of the clock | 80 | * @get_time: function to retrieve the current time of the clock |
84 | * @curr_timer: the timer which is executing a callback right now | 81 | * @curr_timer: the timer which is executing a callback right now |
@@ -87,8 +84,8 @@ struct hrtimer_base { | |||
87 | clockid_t index; | 84 | clockid_t index; |
88 | spinlock_t lock; | 85 | spinlock_t lock; |
89 | struct rb_root active; | 86 | struct rb_root active; |
90 | struct list_head pending; | 87 | struct rb_node *first; |
91 | unsigned long resolution; | 88 | ktime_t resolution; |
92 | ktime_t (*get_time)(void); | 89 | ktime_t (*get_time)(void); |
93 | struct hrtimer *curr_timer; | 90 | struct hrtimer *curr_timer; |
94 | }; | 91 | }; |
@@ -125,8 +122,7 @@ static inline int hrtimer_active(const struct hrtimer *timer) | |||
125 | } | 122 | } |
126 | 123 | ||
127 | /* Forward a hrtimer so it expires after now: */ | 124 | /* Forward a hrtimer so it expires after now: */ |
128 | extern unsigned long hrtimer_forward(struct hrtimer *timer, | 125 | extern unsigned long hrtimer_forward(struct hrtimer *timer, ktime_t interval); |
129 | const ktime_t interval); | ||
130 | 126 | ||
131 | /* Precise sleep: */ | 127 | /* Precise sleep: */ |
132 | extern long hrtimer_nanosleep(struct timespec *rqtp, | 128 | 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) | |||
272 | * idea of the (in)accuracy of timers. Timer values are rounded up to | 272 | * idea of the (in)accuracy of timers. Timer values are rounded up to |
273 | * this resolution values. | 273 | * this resolution values. |
274 | */ | 274 | */ |
275 | #define KTIME_REALTIME_RES (NSEC_PER_SEC/HZ) | 275 | #define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC } |
276 | #define KTIME_MONOTONIC_RES (NSEC_PER_SEC/HZ) | 276 | #define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC } |
277 | 277 | ||
278 | /* Get the monotonic time in timespec format: */ | 278 | /* Get the monotonic time in timespec format: */ |
279 | extern void ktime_get_ts(struct timespec *ts); | 279 | extern void ktime_get_ts(struct timespec *ts); |