[PATCH] hrtimers: simplify nanosleep

nanosleep is the only user of the expired state, so let it manage this itself,
which makes the hrtimer code a bit simpler.  The remaining time is also only
calculated if requested.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-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:08 -08:00 committed by Linus Torvalds
parent 3b98a53281
commit 432569bb9d
2 changed files with 63 additions and 83 deletions

View file

@ -38,9 +38,7 @@ enum 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_INACTIVE, /* Timer is inactive */
HRTIMER_PENDING, /* Timer is pending */
};