On Sun, 28 Nov 1999, Arun Sharma wrote:
>
> [ For some reason, this post through muc.lists.freebsd.hackers gateway didn't
> show up on the mailing list. Forwarding it to the mailing list.. ]
>
> On Thu, 04 Nov 1999 20:38:50 -0800, Mike Smith <[EMAIL PROTECTED]> wrote:
> > > I don't see any examples in sys/modules. The SYSCTL_INT macros eventually
> > > expands to DATA_SET which puts certain data in a different ELF section.
> >
> > You don't do anything magic at all; it's handled invisibly by the
> > kernel linker.
>
> I was thinking about implementing SMP cpu stats using sysctl today and
> I have a question - can I create sysctl nodes dynamically ?
>
> i.e.
>
> for (cpu = 0; cpu < get_num_cpus(); cpu++) {
> /* create sysctl node here ? */
> }
Yes. See for example linux emulator or my SPY module:
http://www.freebsd.org/~abial/spy
You can also create whole new branches, as the second example shows.
Andrzej Bialecki
// <[EMAIL PROTECTED]> WebGiro AB, Sweden (http://www.webgiro.com)
// -------------------------------------------------------------------
// ------ FreeBSD: The Power to Serve. http://www.freebsd.org --------
// --- Small & Embedded FreeBSD: http://www.freebsd.org/~picobsd/ ----
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message