From owner-svn-src-head@FreeBSD.ORG Thu May 14 15:14:04 2015 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 77B06C92; Thu, 14 May 2015 15:14:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 65D6F17C5; Thu, 14 May 2015 15:14:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4EFE4C5079023; Thu, 14 May 2015 15:14:04 GMT (envelope-from jonathan@FreeBSD.org) Received: (from jonathan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4EFE4jm079022; Thu, 14 May 2015 15:14:04 GMT (envelope-from jonathan@FreeBSD.org) Message-Id: <201505141514.t4EFE4jm079022@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jonathan set sender to jonathan@FreeBSD.org using -f From: Jonathan Anderson Date: Thu, 14 May 2015 15:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r282906 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 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, 14 May 2015 15:14:04 -0000 Author: jonathan Date: Thu May 14 15:14:03 2015 New Revision: 282906 URL: https://svnweb.freebsd.org/changeset/base/282906 Log: Allow sizeof(cpuset_t) to be queried in capability mode. This allows functions that retrieve and inspect pthread_attr_t objects to work correctly: querying the cpuset_t size is part of querying CPU affinity information, which is part of creating a complete pthread_attr_t. Approved by: rwatson (mentor) Reviewed by: pjd Sponsored by: NSERC Modified: head/sys/kern/kern_cpuset.c Modified: head/sys/kern/kern_cpuset.c ============================================================================== --- head/sys/kern/kern_cpuset.c Thu May 14 14:40:01 2015 (r282905) +++ head/sys/kern/kern_cpuset.c Thu May 14 15:14:03 2015 (r282906) @@ -113,7 +113,7 @@ static struct unrhdr *cpuset_unr; static struct cpuset *cpuset_zero, *cpuset_default; /* Return the size of cpuset_t at the kernel level */ -SYSCTL_INT(_kern_sched, OID_AUTO, cpusetsize, CTLFLAG_RD, +SYSCTL_INT(_kern_sched, OID_AUTO, cpusetsize, CTLFLAG_RD | CTLFLAG_CAPRD, SYSCTL_NULL_INT_PTR, sizeof(cpuset_t), "sizeof(cpuset_t)"); cpuset_t *cpuset_root;