mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04: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 <[email protected]> ] [ made new helper static, Adrian Bunk <[email protected]> ] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: john stultz <[email protected]> Cc: Roman Zippel <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
1cfd68496e
commit
fd064b9b77
3 files changed
+22
-4
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user