Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2001 04:43:05 +0900 (JST)
From:      Hajimu UMEMOTO <ume@FreeBSD.org>
To:        bright@wintelcom.net
Cc:        arch@FreeBSD.org
Subject:   Re: dynamic vs static sysctls?
Message-ID:  <20010116.044305.78700228.ume@FreeBSD.org>
In-Reply-To: <20010115111439.C7240@fw.wintelcom.net>
References:  <20010115103757.B7240@fw.wintelcom.net> <20010116.035009.71081161.ume@FreeBSD.org> <20010115111439.C7240@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> On Mon, 15 Jan 2001 11:14:39 -0800
>>>>> Alfred Perlstein <bright@wintelcom.net> said:

bright> Just do this:

bright> static unsigned int nforks = 0;
bright> SYSCTL_UINT(_kern, OID_AUTO, nforks, CTLFLAG_RD, &nforks, 0,
bright> 	"number of fork()s since boot");

bright> document the sysctl. :)

Okey.  Thanks.

bright> Oh, you mean in a kernel module?  I think you need to use
bright> kernel_sysctl() (from kern/kern_sysctl.c), I'm not sure if it's
bright> documented anywhere, if not it'd be nice to have a sysctl(9) manpage.
bright> :)

No.  I just want to distinguish the version from userland.

> Do you mean ALLPROC_LOCK(AP_EXCLUSIVE) / ALLPROC_LOCK(AP_RELEASE) ?
> If so, I'll move nforks++ between them.

bright> No, don't do that, we'll figure out how to lock it later, you may
bright> want to use the mp_fixme (mpfixme?) macro near the sysctl variable
bright> though.

Okey, I see.

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@bisd.hitachi.co.jp  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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