Date: Wed, 27 Oct 2010 01:39:51 -0700 From: Garrett Cooper <gcooper@FreeBSD.org> To: David Xu <davidxu@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org> Subject: Re: svn commit: r214409 - head/sys/kern Message-ID: <AANLkTikzEz-_hPkv7hULwAWyrWj8DF14m-izvmUOkH-G@mail.gmail.com> In-Reply-To: <4CC85552.2020100@freebsd.org> References: <201010270232.o9R2Wsu3084553@svn.freebsd.org> <AANLkTi=2dTVmB8Goj%2BNXq4F6SmZBNS3bxn8gLjmQ%2BdfV@mail.gmail.com> <4CC803A8.3040602@freebsd.org> <20101027082122.GD1848@garage.freebsd.pl> <4CC85552.2020100@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 27, 2010 at 9:37 AM, David Xu <davidxu@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 :).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikzEz-_hPkv7hULwAWyrWj8DF14m-izvmUOkH-G>