Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 May 2015 15:14:04 +0000 (UTC)
From:      Jonathan Anderson <jonathan@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r282906 - head/sys/kern
Message-ID:  <201505141514.t4EFE4jm079022@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505141514.t4EFE4jm079022>