Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 2004 11:25:40 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        hackers@FreeBSD.org
Cc:        Ivan Voras <ivoras@fer.hr>
Subject:   Re: Accessing sysctls from kernel
Message-ID:  <200402261125.40491.jhb@FreeBSD.org>
In-Reply-To: <403DF050.80208@fer.hr>
References:  <403DF050.80208@fer.hr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 26 February 2004 08:10 am, Ivan Voras wrote:
> In sys/sys/sysctl.h I see function kernel_sysctlbyname() that looks (to
> me) to be intended for accessing sysctl values from kernel, but for it's
> first parameter it requires a struct thread *td.
>
> What should I pass to it? (I'm calling it from inside a screensaver module)

You can always just use curthread, it is never NULL.

-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



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