Subject: Re: sysctl(3) [Was: CVS commit: syssrc/sys/arch]
To: None <thorpej@wasabisystems.com>
From: Greg A. Woods <woods@weird.com>
List: source-changes
Date: 08/26/2001 14:37:54
[ On Sunday, August 26, 2001 at 10:06:52 (-0700), Jason R Thorpe wrote: ]
> Subject: Re: sysctl(3) [Was: CVS commit: syssrc/sys/arch]
>
> On Mon, Aug 27, 2001 at 02:41:19AM +1000, Simon Burge wrote:
>
> > > Log Message:
> > >
> > > sysctl(2) -> sysctl(3) (in comments)
> >
> > Offhandedly, I've always been curious as to why there's a sysctl(3)
> > when sysctl() is a system call...
>
> sysctl(3) is a wrapper around __sysctl(2).
which is a pretty lame excuse if you ask me! ;-)
The leading double-underscore pretty much means it's "hands-off" from
any application API, and:
$ man __sysctl
man: no entry for __sysctl in the manual.
What's even more lame is that the source for __sysctl() is generated on
the fly:
printf '#include "SYS.h"\nRSYSCALL(__sysctl)\n' | cpp | as
YUCK! :-)
Of course that's far from the worst of weirdness in syscall land....
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>