[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>
This commit is contained in:
Roman Zippel 2006-03-26 01:38:09 -08:00 committed by Linus Torvalds
parent 432569bb9d
commit b75f7a51ca
2 changed files with 7 additions and 18 deletions

View file

@ -34,13 +34,7 @@ enum hrtimer_restart {
HRTIMER_RESTART,
};
/*
* Timer states:
*/
enum hrtimer_state {
HRTIMER_INACTIVE, /* Timer is inactive */
HRTIMER_PENDING, /* Timer is pending */
};
#define HRTIMER_INACTIVE ((void *)1UL)
struct hrtimer_base;
@ -61,7 +55,6 @@ struct hrtimer_base;
struct hrtimer {
struct rb_node node;
ktime_t expires;
enum hrtimer_state state;
int (*function)(void *);
void *data;
struct hrtimer_base *base;
@ -124,7 +117,7 @@ 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: */