diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-03-17 11:06:15 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-03-17 11:06:15 +1100 |
commit | 599e8a856d1af6b9b49e6d855c1a311793b210c4 (patch) | |
tree | 520e5081882f4505c56822df533e7e43c16a1073 /include | |
parent | 4dddf5b556496372a03478d04d5bf5e4629f8bee (diff) | |
parent | 808c28cc573334c81e82282b424fd9f435aac539 (diff) |
Merge commit 'timers/auto-timers-next'
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/timer.h | 22 | ||||
-rw-r--r-- | include/linux/timex.h | 2 |
2 files changed, 3 insertions, 21 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h index 51774eb87cc6..6cdb6f3331f1 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h @@ -161,8 +161,8 @@ static inline int timer_pending(const struct timer_list * timer) extern void add_timer_on(struct timer_list *timer, int cpu); 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); +extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); /* * The jiffies value which is added to now, when there is no timer @@ -221,25 +221,7 @@ static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) } #endif -/** - * add_timer - start a timer - * @timer: the timer to be added - * - * The kernel will do a ->function(->data) callback from the - * timer interrupt at the ->expires point in the future. The - * current time is 'jiffies'. - * - * The timer's ->expires, ->function (and if the handler uses it, ->data) - * fields must be set prior calling this function. - * - * Timers with an ->expires field in the past will be executed in the next - * timer tick. - */ -static inline void add_timer(struct timer_list *timer) -{ - BUG_ON(timer_pending(timer)); - __mod_timer(timer, timer->expires); -} +extern void add_timer(struct timer_list *timer); #ifdef CONFIG_SMP extern int try_to_del_timer_sync(struct timer_list *timer); diff --git a/include/linux/timex.h b/include/linux/timex.h index 998a55d80acf..aa3475fcff64 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -190,7 +190,7 @@ struct timex { * offset and maximum frequency tolerance. */ #define SHIFT_USEC 16 /* frequency offset scale (shift) */ -#define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC)) +#define PPM_SCALE ((s64)NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC)) #define PPM_SCALE_INV_SHIFT 19 #define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \ PPM_SCALE + 1) |