Accessing sysctls from kernel

John Baldwin jhb at FreeBSD.org
Thu Feb 26 08:24:19 PST 2004


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 at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the freebsd-hackers mailing list