diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-02-16 04:27:47 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-16 11:13:58 -0500 |
commit | fd064b9b7770d5c7705bf9542950c7bd81c30f98 (patch) | |
tree | 8b14c81f983e49b5553fd6764139bffb1d4f1648 /include/linux/timer.h | |
parent | 1cfd68496e53f7be09a3c1358d1d389004217541 (diff) |
[PATCH] Extend next_timer_interrupt() to use a reference jiffie
For CONFIG_NO_HZ we need to calculate the next timer wheel event based on a
given jiffie value. Extend the existing code to allow the extra 'now'
argument. Provide a compability function for the existing implementations to
call the function with now == jiffies. (This also solves the racyness of the
original code vs. jiffies changing during the iteration.)
No functional changes to existing users of this infrastructure.
[ remove WARN_ON() that triggered on s390, by Carsten Otte <cotte@de.ibm.com> ]
[ made new helper static, Adrian Bunk <bunk@stusta.de> ]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/timer.h')
-rw-r--r-- | include/linux/timer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h index fb5edaaf0ebd..bd0af324fd48 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -61,7 +61,17 @@ extern int del_timer(struct timer_list * timer); | |||
61 | extern int __mod_timer(struct timer_list *timer, unsigned long expires); | 61 | extern int __mod_timer(struct timer_list *timer, unsigned long expires); |
62 | extern int mod_timer(struct timer_list *timer, unsigned long expires); | 62 | extern int mod_timer(struct timer_list *timer, unsigned long expires); |
63 | 63 | ||
64 | /* | ||
65 | * Return when the next timer-wheel timeout occurs (in absolute jiffies), | ||
66 | * locks the timer base: | ||
67 | */ | ||
64 | extern unsigned long next_timer_interrupt(void); | 68 | extern unsigned long next_timer_interrupt(void); |
69 | /* | ||
70 | * Return when the next timer-wheel timeout occurs (in absolute jiffies), | ||
71 | * locks the timer base and does the comparison against the given | ||
72 | * jiffie. | ||
73 | */ | ||
74 | extern unsigned long get_next_timer_interrupt(unsigned long now); | ||
65 | 75 | ||
66 | /** | 76 | /** |
67 | * add_timer - start a timer | 77 | * add_timer - start a timer |