Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2010 16:33:07 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
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>, Garrett Cooper <gcooper@freebsd.org>
Subject:   Re: svn commit: r214409 - head/sys/kern
Message-ID:  <20101027133307.GQ2392@deviant.kiev.zoral.com.ua>
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

--qShzMMhzd2CdnVN0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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)?
> >
>=20
> 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. ;-)
>=20
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.

--qShzMMhzd2CdnVN0
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEARECAAYFAkzIKhIACgkQC3+MBN1Mb4g0RACg4rYLGVbX4vXDx5/wOjp30mGc
P48AniTB28JicB/3vkEGN6J0nR86AEJn
=Wl2c
-----END PGP SIGNATURE-----

--qShzMMhzd2CdnVN0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101027133307.GQ2392>