Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Mar 2014 00:26:48 +0100
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik <mjg@FreeBSD.org>
Subject:   Re: svn commit: r263704 - head/sys/kern
Message-ID:  <20140325232648.GA19412@dft-labs.eu>
In-Reply-To: <F0A53D44-BC30-4A02-8DD0-2A1B8711F2C7@gmail.com>
References:  <201403250328.s2P3Swsl054558@svn.freebsd.org> <F0A53D44-BC30-4A02-8DD0-2A1B8711F2C7@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 25, 2014 at 08:03:13AM -0600, Warner Losh wrote:
> On Mar 24, 2014, at 9:28 PM, Mateusz Guzik <mjg@FreeBSD.org> wrote:
> > Author: mjg
> > Date: Tue Mar 25 03:28:58 2014
> > New Revision: 263704
> > URL: http://svnweb.freebsd.org/changeset/base/263704
> > 
> > Log:
> >  Make /dev/devctl mpsafe.
> > 
> >  MFC after:	1 week
> > 
> > static int sysctl_devctl_disable(SYSCTL_HANDLER_ARGS);
> > /* XXX Need to support old-style tunable hw.bus.devctl_disable" */
> > -SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW, NULL,
> > -    0, sysctl_devctl_disable, "I", "devctl disable -- deprecated");
> > +SYSCTL_PROC(_hw_bus, OID_AUTO, devctl_disable, CTLTYPE_INT | CTLFLAG_RW |
> > +    CTLFLAG_MPSAFE, NULL, 0, sysctl_devctl_disable, "I",
> > +    "devctl disable -- deprecated”);
> 
> This can likely be deleted now...
> 

http://svnweb.freebsd.org/changeset/base/263754

> > @@ -420,23 +420,31 @@ devinit(void)
> > static int
> > devopen(struct cdev *dev, int oflags, int devtype, struct thread *td)
> > {
> > +
> > 	if (devsoftc.inuse)
> > 		return (EBUSY);
> 
> Why not delete these two lines? Since this isn’t a performance critical part of the code,
> it is clearer and safer to just test inuse inside the locked section.
> 

http://svnweb.freebsd.org/changeset/base/263753

-- 
Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140325232648.GA19412>