Lines Matching refs:timer

48 #include <linux/timer.h>
112 * TIPC timer code
117 * k_init_timer - initialize a timer
118 * @timer: pointer to timer structure
119 * @routine: pointer to routine to invoke when timer expires
120 * @argument: value to pass to routine when timer expires
124 static inline void k_init_timer(struct timer_list *timer, Handler routine,
127 setup_timer(timer, routine, argument);
131 * k_start_timer - start a timer
132 * @timer: pointer to timer structure
135 * Schedules a previously initialized timer for later execution.
136 * If timer is already running, the new timeout overrides the previous request.
138 * To ensure the timer doesn't expire before the specified delay elapses,
143 static inline void k_start_timer(struct timer_list *timer, unsigned long msec)
145 mod_timer(timer, jiffies + msecs_to_jiffies(msec) + 1);
149 * k_cancel_timer - cancel a timer
150 * @timer: pointer to timer structure
152 * Cancels a previously initialized timer.
153 * Can be called safely even if the timer is already inactive.
155 * WARNING: Must not be called when holding locks required by the timer's
158 static inline void k_cancel_timer(struct timer_list *timer)
160 del_timer_sync(timer);
164 * k_term_timer - terminate a timer
165 * @timer: pointer to timer structure
167 * Prevents further use of a previously initialized timer.
169 * WARNING: Caller must ensure timer isn't currently running.
171 * (Do not "enhance" this routine to automatically cancel an active timer,
174 static inline void k_term_timer(struct timer_list *timer)