diff options
author | davidxu <davidxu@FreeBSD.org> | 2010-11-01 00:42:25 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2010-11-01 00:42:25 +0000 |
commit | 4c899bcdf584314de52f734880351b0c02dfe3bf (patch) | |
tree | c86496b6dc9119d84290732e3355ba3bec0aedf6 /sys/kern | |
parent | c108d430e633c3faca1a9c7c2ed97f2bf3468f5f (diff) | |
download | FreeBSD-src-4c899bcdf584314de52f734880351b0c02dfe3bf.zip FreeBSD-src-4c899bcdf584314de52f734880351b0c02dfe3bf.tar.gz |
Use integer for size of cpuset, as it won't be bigger than INT_MAX,
This is requested by bge.
Also move the sysctl into file kern_cpuset.c, because it should
always be there, it is independent of thread scheduler.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_cpuset.c | 4 | ||||
-rw-r--r-- | sys/kern/sched_ule.c | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index 23aa9df..c5eb659 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -107,6 +107,10 @@ static struct setlist cpuset_ids; static struct unrhdr *cpuset_unr; static struct cpuset *cpuset_zero; +/* Return the size of cpuset_t at the kernel level */ +SYSCTL_INT(_kern_sched, OID_AUTO, cpusetsize, CTLFLAG_RD, + 0, sizeof(cpuset_t), "sizeof(cpuset_t)"); + cpuset_t *cpuset_root; /* diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 641979d..0005968 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -2713,7 +2713,6 @@ sysctl_kern_sched_topology_spec(SYSCTL_HANDLER_ARGS) return (err); } -static size_t _kern_cpuset_size = sizeof(cpuset_t); #endif SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RW, 0, "Scheduler"); @@ -2751,14 +2750,6 @@ SYSCTL_PROC(_kern_sched, OID_AUTO, topology_spec, CTLTYPE_STRING | CTLFLAG_RD, NULL, 0, sysctl_kern_sched_topology_spec, "A", "XML dump of detected CPU topology"); -/* - * Return the size of cpuset_t at the kernel level - * - * XXX (gcooper): replace ULONG with SIZE once CTLTYPE_SIZE is implemented. - */ -SYSCTL_ULONG(_kern_sched, OID_AUTO, cpusetsize, CTLFLAG_RD, - &_kern_cpuset_size, 0, "Kernel-level cpuset_t struct size"); - #endif /* ps compat. All cpu percentages from ULE are weighted. */ |