mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 06:01:23 +00:00
[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>
This commit is contained in:
parent
1cfd68496e
commit
fd064b9b77
3 changed files with 22 additions and 4 deletions
|
@ -61,7 +61,17 @@ extern int del_timer(struct timer_list * timer);
|
|||
extern int __mod_timer(struct timer_list *timer, unsigned long expires);
|
||||
extern int mod_timer(struct timer_list *timer, unsigned long expires);
|
||||
|
||||
/*
|
||||
* Return when the next timer-wheel timeout occurs (in absolute jiffies),
|
||||
* locks the timer base:
|
||||
*/
|
||||
extern unsigned long next_timer_interrupt(void);
|
||||
/*
|
||||
* Return when the next timer-wheel timeout occurs (in absolute jiffies),
|
||||
* locks the timer base and does the comparison against the given
|
||||
* jiffie.
|
||||
*/
|
||||
extern unsigned long get_next_timer_interrupt(unsigned long now);
|
||||
|
||||
/**
|
||||
* add_timer - start a timer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue