On Tue, Mar 25, 2014 at 08:03:13AM -0600, Warner Losh wrote: > On Mar 24, 2014, at 9:28 PM, Mateusz Guzik <m...@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> _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"