From owner-svn-src-head@FreeBSD.ORG Tue Oct 21 21:45:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAB0E9AB; Tue, 21 Oct 2014 21:45:51 +0000 (UTC) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8A06243; Tue, 21 Oct 2014 21:45:50 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id em10so3014790wid.7 for ; Tue, 21 Oct 2014 14:45:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=RkOG8y7w89EITJN7pOIqRao8Lhk+iGtje5MJ9SYLDn8=; b=e2IQyItaotFkBgSgLKA5taJaGWkUSxTU+G8MjKDeEZPj58JyMqRshH3IJCpjy17dNo 2DmJSNhGpEWLRysPhKUQmYVnIhZEPJ6O4p/R2y1kDvxiGzd9h11Dpb/IgNkb/vbrcXaQ 7qPjXqqA6G0A3HCNSL2fh1jVYEYA2PzcFvwsoOIliUCIlqxC8m9iHA7+q3l+AWAWfF+7 9d6hS321HeYGibrVD7NDXh0UYWVpsBm+Y7N2+tx/q4AhY2qzhDYheY2FJk1mrIiha8gh Srp6o5awIolTjJz5+s5vpGErAlo4jX1sDZRkOTkd9ZmhPFhL1Gd2Nq/sCvOV3nOezeGY 68Ng== X-Received: by 10.194.246.230 with SMTP id xz6mr44920235wjc.3.1413927949156; Tue, 21 Oct 2014 14:45:49 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id h8sm371235wjs.43.2014.10.21.14.45.47 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 21 Oct 2014 14:45:48 -0700 (PDT) Date: Tue, 21 Oct 2014 23:45:45 +0200 From: Mateusz Guzik To: "Bjoern A. Zeeb" Subject: Re: svn commit: r273400 - in head/sys: kern sys Message-ID: <20141021214545.GC28763@dft-labs.eu> References: <201410211902.s9LJ2RoA031960@svn.freebsd.org> <50143173-0319-45C0-A00E-AD2AA303C65D@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <50143173-0319-45C0-A00E-AD2AA303C65D@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik 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:45:52 -0000 On Tue, Oct 21, 2014 at 09:40:38PM +0000, Bjoern A. Zeeb wrote: > > 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 > > > > Log: > > Rename sysctl_lock and _unlock to sysctl_xlock and _xunlock. > > You are perfectly describing what you are doing, but I’d also like to understand the “why?” > First off, these function do lock sysctl exclusively, so I find this to be a better suited name. In https://svnweb.freebsd.org/base?view=revision&revision=273401 I added shared locking to sysctl and this change "coincidently" freed up a nice name for a functions which remember previous lock type and lock it the same way later. -- Mateusz Guzik