svn commit: r227749 - head/sys/kern
Warner Losh
imp at bsdimp.com
Sun Nov 20 19:05:49 UTC 2011
Is this right? Passing 0 to timo causes a panic? That can't be good.
Wanrer
On Nov 20, 2011, at 1:36 AM, Hans Petter Selasky wrote:
> Author: hselasky
> Date: Sun Nov 20 08:36:18 2011
> New Revision: 227749
> URL: http://svn.freebsd.org/changeset/base/227749
>
> Log:
> Given that the typical usage of pause() is pause("zzz", hz / N), where N can
> be greater than hz in some cases, simply ignore a timeout value of zero.
>
> Suggested by: Bruce Evans
> MFC after: 1 week
>
> Modified:
> head/sys/kern/kern_synch.c
>
> Modified: head/sys/kern/kern_synch.c
> ==============================================================================
> --- head/sys/kern/kern_synch.c Sun Nov 20 08:29:23 2011 (r227748)
> +++ head/sys/kern/kern_synch.c Sun Nov 20 08:36:18 2011 (r227749)
> @@ -333,7 +333,7 @@ msleep_spin(void *ident, struct mtx *mtx
> int
> pause(const char *wmesg, int timo)
> {
> - KASSERT(timo > 0, ("pause: timo must be > 0"));
> + KASSERT(timo >= 0, ("pause: timo must be >= 0"));
>
> /* silently convert invalid timeouts */
> if (timo < 1)
>
>
More information about the svn-src-head
mailing list