On Wed, Oct 27, 2010 at 04:37:38PM +0000, David Xu 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. ;-)
> 
I think that sysctl is the way forward, but you may add non-portable
FreeBSD function to get the value, and use an ELF aux vector interface
to avoid sysctl most of the time.

Attachment: pgpf6YT7n0Usy.pgp
Description: PGP signature



Reply via email to