lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100102193013.GA2232@core.coreip.homeip.net>
Date:	Sat, 2 Jan 2010 11:30:13 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	Arjan van de Ven <arjan@...radead.org>
Cc:	tglx@...utronix.de, Andi Kleen <andi@...stfloor.org>,
	linux-kernel@...r.kernel.org
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ