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;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to