aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/timer.h')
-rw-r--r--include/linux/timer.h22
1 files changed, 2 insertions, 20 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)
161 161
162extern void add_timer_on(struct timer_list *timer, int cpu); 162extern void add_timer_on(struct timer_list *timer, int cpu);
163extern int del_timer(struct timer_list * timer); 163extern int del_timer(struct timer_list * timer);
164extern int __mod_timer(struct timer_list *timer, unsigned long expires);
165extern int mod_timer(struct timer_list *timer, unsigned long expires); 164extern int mod_timer(struct timer_list *timer, unsigned long expires);
165extern int mod_timer_pending(struct timer_list *timer, unsigned long expires);
166 166
167/* 167/*
168 * The jiffies value which is added to now, when there is no timer 168 * 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)
221} 221}
222#endif 222#endif
223 223
224/** 224extern void add_timer(struct timer_list *timer);
225 * add_timer - start a timer
226 * @timer: the timer to be added
227 *
228 * The kernel will do a ->function(->data) callback from the
229 * timer interrupt at the ->expires point in the future. The
230 * current time is 'jiffies'.
231 *
232 * The timer's ->expires, ->function (and if the handler uses it, ->data)
233 * fields must be set prior calling this function.
234 *
235 * Timers with an ->expires field in the past will be executed in the next
236 * timer tick.
237 */
238static inline void add_timer(struct timer_list *timer)
239{
240 BUG_ON(timer_pending(timer));
241 __mod_timer(timer, timer->expires);
242}
243 225
244#ifdef CONFIG_SMP 226#ifdef CONFIG_SMP
245 extern int try_to_del_timer_sync(struct timer_list *timer); 227 extern int try_to_del_timer_sync(struct timer_list *timer);