From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Arjan van de Ven <arjan@infradead.org>
Cc: tglx@linutronix.de, Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] timer: Introduce mod_timer_msec()
Date: Sat, 2 Jan 2010 11:30:13 -0800 [thread overview]
Message-ID: <20100102193013.GA2232@core.coreip.homeip.net> (raw)
In-Reply-To: <20100102112108.574396fd@infradead.org>
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
next prev parent reply other threads:[~2010-01-02 19:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-02 18:48 [PATCH] " Arjan van de Ven
2010-01-02 18:50 ` users of mod_timer_msec() Arjan van de Ven
2010-01-02 19:11 ` Andi Kleen
2010-01-02 19:19 ` Arjan van de Ven
2010-01-02 19:21 ` [PATCH v2] timer: Introduce mod_timer_msec() Arjan van de Ven
2010-01-02 19:30 ` Dmitry Torokhov [this message]
2010-01-02 19:36 ` Arjan van de Ven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100102193013.GA2232@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=andi@firstfloor.org \
--cc=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome