svn commit: r214409 - head/sys/kern

Garrett Cooper gcooper at FreeBSD.org
Wed Oct 27 08:39:53 UTC 2010


On Wed, Oct 27, 2010 at 9:37 AM, David Xu <davidxu at freebsd.org> wrote:
> Pawel Jakub Dawidek wrote:
>>
>> On Wed, Oct 27, 2010 at 10:49:12AM +0000, David Xu wrote:
>>>
>>> I really hate to see such a problem that userland can not figure out
>>> what kernel is using, I try hardly to guess, but still can not find
>>> what it is using. yes, I think the doc may need to be fixed or
>>> another syscall is needed.
>>
>> Maybe you could just add sysctl and eventually put it into sysconf(3)?
>
> I just found a dirty method, use sizeof(long) and kern.smp.maxcpus
> 32 to figure out the size the kernel is using, because it is how
> cpuset_t is constructed, wish it will never be changed. ;-)

Pawel's suggestion makes more sense to be honest. If this should be
added to sysconf(3) and is worthy of abstracting out into a more
generalized concept, then it might be a good idea to get into POSIX.
However, it would need to be hashed out because the current
implementation is very FreeBSD centric of course :).


More information about the svn-src-all mailing list