diff options
Diffstat (limited to 'include/linux/timer.h')
-rw-r--r-- | include/linux/timer.h | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/include/linux/timer.h b/include/linux/timer.h index daf9685b861c..e2d662e3416e 100644 --- a/include/linux/timer.h +++ b/include/linux/timer.h | |||
@@ -86,8 +86,8 @@ static inline int timer_pending(const struct timer_list * timer) | |||
86 | 86 | ||
87 | extern void add_timer_on(struct timer_list *timer, int cpu); | 87 | extern void add_timer_on(struct timer_list *timer, int cpu); |
88 | extern int del_timer(struct timer_list * timer); | 88 | extern int del_timer(struct timer_list * timer); |
89 | extern int __mod_timer(struct timer_list *timer, unsigned long expires); | ||
90 | extern int mod_timer(struct timer_list *timer, unsigned long expires); | 89 | extern int mod_timer(struct timer_list *timer, unsigned long expires); |
90 | extern int mod_timer_pending(struct timer_list *timer, unsigned long expires); | ||
91 | 91 | ||
92 | /* | 92 | /* |
93 | * The jiffies value which is added to now, when there is no timer | 93 | * The jiffies value which is added to now, when there is no timer |
@@ -146,25 +146,7 @@ static inline void timer_stats_timer_clear_start_info(struct timer_list *timer) | |||
146 | } | 146 | } |
147 | #endif | 147 | #endif |
148 | 148 | ||
149 | /** | 149 | extern void add_timer(struct timer_list *timer); |
150 | * add_timer - start a timer | ||
151 | * @timer: the timer to be added | ||
152 | * | ||
153 | * The kernel will do a ->function(->data) callback from the | ||
154 | * timer interrupt at the ->expires point in the future. The | ||
155 | * current time is 'jiffies'. | ||
156 | * | ||
157 | * The timer's ->expires, ->function (and if the handler uses it, ->data) | ||
158 | * fields must be set prior calling this function. | ||
159 | * | ||
160 | * Timers with an ->expires field in the past will be executed in the next | ||
161 | * timer tick. | ||
162 | */ | ||
163 | static inline void add_timer(struct timer_list *timer) | ||
164 | { | ||
165 | BUG_ON(timer_pending(timer)); | ||
166 | __mod_timer(timer, timer->expires); | ||
167 | } | ||
168 | 150 | ||
169 | #ifdef CONFIG_SMP | 151 | #ifdef CONFIG_SMP |
170 | extern int try_to_del_timer_sync(struct timer_list *timer); | 152 | extern int try_to_del_timer_sync(struct timer_list *timer); |