diff options
author | jonathan <jonathan@FreeBSD.org> | 2015-05-14 15:14:03 +0000 |
---|---|---|
committer | jonathan <jonathan@FreeBSD.org> | 2015-05-14 15:14:03 +0000 |
commit | 1288a9c61937a95d6586948da68c17b9b867bee3 (patch) | |
tree | ea738e7e70478789c7b10b4d87ff87a8bd05c7a4 | |
parent | 10ed60b0b15700472871c39cf8df4b49642edca1 (diff) | |
download | FreeBSD-src-1288a9c61937a95d6586948da68c17b9b867bee3.zip FreeBSD-src-1288a9c61937a95d6586948da68c17b9b867bee3.tar.gz |
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
-rw-r--r-- | sys/kern/kern_cpuset.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index 47845ef..71481fe 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -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; |