From owner-svn-src-head@freebsd.org Thu Mar 17 07:17:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20B76AD31EB; Thu, 17 Mar 2016 07:17:12 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC850FCE; Thu, 17 Mar 2016 07:17:11 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id DFCD41FE024; Thu, 17 Mar 2016 08:17:02 +0100 (CET) Subject: Re: svn commit: r296933 - in head: share/man/man9 sys/sys To: Gleb Smirnoff References: <201603160837.u2G8bqgr087126@repo.freebsd.org> <20160316203601.GO1328@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: Hans Petter Selasky Message-ID: <56EA5A96.5070402@selasky.org> Date: Thu, 17 Mar 2016 08:19:50 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160316203601.GO1328@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 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: Thu, 17 Mar 2016 07:17:12 -0000 On 03/16/16 21:36, Gleb Smirnoff wrote: > On Wed, Mar 16, 2016 at 08:37:52AM +0000, Hans Petter Selasky wrote: > H> Modified: head/sys/sys/sysctl.h > H> ============================================================================== > H> --- head/sys/sys/sysctl.h Wed Mar 16 06:42:15 2016 (r296932) > H> +++ head/sys/sys/sysctl.h Wed Mar 16 08:37:52 2016 (r296933) > H> @@ -654,8 +654,10 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_e > H> SYSCTL_OID(parent, nbr, name, \ > H> CTLTYPE_OPAQUE | CTLFLAG_MPSAFE | (access), \ > H> (ptr), (len), sysctl_handle_counter_u64_array, "S", descr); \ > H> - CTASSERT(((access) & CTLTYPE) == 0 || \ > H> - ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE) > H> + CTASSERT((((access) & CTLTYPE) == 0 || \ > H> + ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_OPAQUE) && \ > H> + sizeof(counter_u64_t) == sizeof(*(ptr)) && \ > H> + sizeof(uint64_t) == sizeof(**(ptr))) > > I don't agree with the last line. Does it assert that counter_u64_t is > implemented using uint64_t? That is true, but that is internal detail, > that might be changed in future. > Yes, it asserts that counter_u64_t is a 64-bit counter, as the name of the typedef hints at. From the past experience there has been several cases where someone has changed a field in structure which is exported as a sysctl, and then the sysctls were never updated. --HPS