Messages in this thread | | | Date | Sat, 2 Jan 2010 11:30:13 -0800 | From | Dmitry Torokhov <> | Subject | Re: [PATCH v2] timer: Introduce mod_timer_msec() |
| |
On Sat, Jan 02, 2010 at 11:21:08AM -0800, Arjan van de Ven wrote: > /** > + * mod_timer_msec - modify a timer's timeout, using relative milliseconds > + * @timer: the timer to be modified > + * @delay_ms: the desired minimum delay in milliseconds > + * > + * Changes the timeout of a timer similar to mod_timer(). > + * > + * mod_timer_msec() takes relative milliseconds rather than absolute > + * jiffies as argument. > + * > + * The function returns whether it has modified a pending timer or not. > + * (ie. mod_timer_msec() of an inactive timer returns 0, mod_timer_msec() of > + * an active timer returns 1.) > + */ > +int mod_timer_msec(struct timer_list *timer, unsigned long delay_ms) > +{ > + return mod_timer(timer, jiffies + msecs_to_jiffies(delay_ms)); > +} > +EXPORT_SYMBOL(mod_timer_msec);
I wonder why isn't this an inline function? Seems tiny enough... Other than that - I'll gladly take input conversion patches.
Thanks.
-- Dmitry
| |