From owner-svn-src-head@FreeBSD.ORG Tue Oct 21 21:40:48 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1F61548; Tue, 21 Oct 2014 21:40:48 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6CDBA1F7; Tue, 21 Oct 2014 21:40:48 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 059AA25D3A91; Tue, 21 Oct 2014 21:40:44 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 30386C76FD8; Tue, 21 Oct 2014 21:40:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id CCBEGO7UnBRc; Tue, 21 Oct 2014 21:40:42 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id E11BDC76FD0; Tue, 21 Oct 2014 21:40:40 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r273400 - in head/sys: kern sys From: "Bjoern A. Zeeb" In-Reply-To: <201410211902.s9LJ2RoA031960@svn.freebsd.org> Date: Tue, 21 Oct 2014 21:40:38 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <50143173-0319-45C0-A00E-AD2AA303C65D@FreeBSD.org> References: <201410211902.s9LJ2RoA031960@svn.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2014 21:40:48 -0000 On 21 Oct 2014, at 19:02 , Mateusz Guzik wrote: > Author: mjg > Date: Tue Oct 21 19:02:26 2014 > New Revision: 273400 > URL: https://svnweb.freebsd.org/changeset/base/273400 >=20 > Log: > Rename sysctl_lock and _unlock to sysctl_xlock and _xunlock. You are perfectly describing what you are doing, but I=92d also like to = understand the =93why?=94 >=20 > Modified: > head/sys/kern/kern_linker.c > head/sys/kern/kern_sysctl.c > head/sys/kern/vfs_init.c > head/sys/sys/sysctl.h >=20 > Modified: head/sys/kern/kern_linker.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_linker.c Tue Oct 21 19:00:32 2014 = (r273399) > +++ head/sys/kern/kern_linker.c Tue Oct 21 19:02:26 2014 = (r273400) > @@ -292,10 +292,10 @@ linker_file_register_sysctls(linker_file > return; >=20 > sx_xunlock(&kld_sx); > - sysctl_lock(); > + sysctl_xlock(); > for (oidp =3D start; oidp < stop; oidp++) > sysctl_register_oid(*oidp); > - sysctl_unlock(); > + sysctl_xunlock(); > sx_xlock(&kld_sx); > } >=20 > @@ -313,10 +313,10 @@ linker_file_unregister_sysctls(linker_fi > return; >=20 > sx_xunlock(&kld_sx); > - sysctl_lock(); > + sysctl_xlock(); > for (oidp =3D start; oidp < stop; oidp++) > sysctl_unregister_oid(*oidp); > - sysctl_unlock(); > + sysctl_xunlock(); > sx_xlock(&kld_sx); > } >=20 >=20 > Modified: head/sys/kern/kern_sysctl.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_sysctl.c Tue Oct 21 19:00:32 2014 = (r273399) > +++ head/sys/kern/kern_sysctl.c Tue Oct 21 19:02:26 2014 = (r273400) > @@ -126,14 +126,14 @@ sysctl_find_oidname(const char *name, st > * Order by number in each list. > */ > void > -sysctl_lock(void) > +sysctl_xlock(void) > { >=20 > SYSCTL_XLOCK(); > } >=20 > void > -sysctl_unlock(void) > +sysctl_xunlock(void) > { >=20 > SYSCTL_XUNLOCK(); >=20 > Modified: head/sys/kern/vfs_init.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/vfs_init.c Tue Oct 21 19:00:32 2014 = (r273399) > +++ head/sys/kern/vfs_init.c Tue Oct 21 19:02:26 2014 = (r273400) > @@ -291,7 +291,7 @@ vfs_register(struct vfsconf *vfc) > * preserved by re-registering the oid after modifying its > * number. > */ > - sysctl_lock(); > + sysctl_xlock(); > SLIST_FOREACH(oidp, SYSCTL_CHILDREN(&sysctl___vfs), oid_link) { > if (strcmp(oidp->oid_name, vfc->vfc_name) =3D=3D 0) { > sysctl_unregister_oid(oidp); > @@ -300,7 +300,7 @@ vfs_register(struct vfsconf *vfc) > break; > } > } > - sysctl_unlock(); > + sysctl_xunlock(); >=20 > return (0); > } >=20 > Modified: head/sys/sys/sysctl.h > = =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/sys/sysctl.h Tue Oct 21 19:00:32 2014 = (r273399) > +++ head/sys/sys/sysctl.h Tue Oct 21 19:02:26 2014 = (r273400) > @@ -770,8 +770,8 @@ int userland_sysctl(struct thread *td, i > size_t *retval, int flags); > int sysctl_find_oid(int *name, u_int namelen, struct sysctl_oid = **noid, > int *nindx, struct sysctl_req *req); > -void sysctl_lock(void); > -void sysctl_unlock(void); > +void sysctl_xlock(void); > +void sysctl_xunlock(void); > int sysctl_wire_old_buffer(struct sysctl_req *req, size_t len); >=20 > struct sbuf; >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983