diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-03-26 04:38:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:02 -0500 |
commit | b75f7a51ca75c977d7d77f735d7a7859194eb39e (patch) | |
tree | c8057a34970f9a6fb04bdfa37e2926df38747790 /include | |
parent | 432569bb9d9d424d7ffe5b21f8205c55bdd1aaa8 (diff) |
[PATCH] hrtimers: remove state field
Remove the state field and encode this information in the rb_node similiar to
normal timer.
Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hrtimer.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 0e8f4762f6f8..f57cc7bd7008 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -34,13 +34,7 @@ enum hrtimer_restart { | |||
34 | HRTIMER_RESTART, | 34 | HRTIMER_RESTART, |
35 | }; | 35 | }; |
36 | 36 | ||
37 | /* | 37 | #define HRTIMER_INACTIVE ((void *)1UL) |
38 | * Timer states: | ||
39 | */ | ||
40 | enum hrtimer_state { | ||
41 | HRTIMER_INACTIVE, /* Timer is inactive */ | ||
42 | HRTIMER_PENDING, /* Timer is pending */ | ||
43 | }; | ||
44 | 38 | ||
45 | struct hrtimer_base; | 39 | struct hrtimer_base; |
46 | 40 | ||
@@ -61,7 +55,6 @@ struct hrtimer_base; | |||
61 | struct hrtimer { | 55 | struct hrtimer { |
62 | struct rb_node node; | 56 | struct rb_node node; |
63 | ktime_t expires; | 57 | ktime_t expires; |
64 | enum hrtimer_state state; | ||
65 | int (*function)(void *); | 58 | int (*function)(void *); |
66 | void *data; | 59 | void *data; |
67 | struct hrtimer_base *base; | 60 | struct hrtimer_base *base; |
@@ -124,7 +117,7 @@ extern ktime_t hrtimer_get_next_event(void); | |||
124 | 117 | ||
125 | static inline int hrtimer_active(const struct hrtimer *timer) | 118 | static inline int hrtimer_active(const struct hrtimer *timer) |
126 | { | 119 | { |
127 | return timer->state == HRTIMER_PENDING; | 120 | return timer->node.rb_parent != HRTIMER_INACTIVE; |
128 | } | 121 | } |
129 | 122 | ||
130 | /* Forward a hrtimer so it expires after now: */ | 123 | /* Forward a hrtimer so it expires after now: */ |