Date: Sun, 20 Nov 2011 12:00:13 -0700 From: Warner Losh <imp@bsdimp.com> To: Hans Petter Selasky <hselasky@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227749 - head/sys/kern Message-ID: <229B993A-8F52-42B3-AE87-7DB4451AA9D0@bsdimp.com> In-Reply-To: <201111200836.pAK8aIEq082864@svn.freebsd.org> References: <201111200836.pAK8aIEq082864@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 >=20 > 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. >=20 > Suggested by: Bruce Evans > MFC after: 1 week >=20 > Modified: > head/sys/kern/kern_synch.c >=20 > Modified: head/sys/kern/kern_synch.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- 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 >=3D 0, ("pause: timo must be >=3D 0")); >=20 > /* silently convert invalid timeouts */ > if (timo < 1) >=20 >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?229B993A-8F52-42B3-AE87-7DB4451AA9D0>