WTFM for system calls
Alex Merritt
merritt.alex at gmail.com
Fri Oct 2 19:53:25 UTC 2015
On Thu, Oct 1, 2015 at 8:08 AM, Frank Leonhardt <freebsd-doc at fjl.co.uk>
wrote:
> It's probably obvious, but not quite obvious enough for me right now...
>
> Where's there a list of FreeBSD kernel (system) calls?
>
This would be sys/syscall.h as you pointed out, a very bare-bones list.
> There's obviously man 2, but you really need to know the name of what
> you're looking for (or guess from the file names). I could also scan
> through the 'C' header files.
>
apropos(1) is useful for searching when you don't have exact names.
> The Developer's Manual mentions HOW to call a system call (and told me
> something shocking about Linux I hadn't realised). But nowhere can I find a
> list - preferably sorted in to sections with a summary, function number,
> symbolic name, and list of parameters. I'm looking for something a bit more
> informative than sys/syscall.h!
>
sys/sysproto.h has the arguments and prototypes
Implementations have the format sys_NAME where name is mmap, open, etc.
Inline comments may exist above each system call's implementation.
I find The Silver Searcher [1] to be quiet useful. From the source
directory, "ag sys_open" will return results very quickly.
[1] http://geoff.greer.fm/ag/
I bet someone's going to refer me to a man page with a name everyone else
> knows but I couldn't guess. Counting down....
>
> Thanks, Frank.
>
More information about the freebsd-questions
mailing list