__sys_fcntl() definition ?

Dan Nelson dnelson at allantgroup.com
Wed Aug 1 20:28:52 UTC 2007


In the last episode (Aug 01), Saifi Khan said:
> While working through the FreeBSD 6.2 codebase, I saw the following
> functions referred at multiple places.
> 
> __sys_fcntl()
> __sys_open()
> __sys_write()
> ...
> 
> Can somebody point out the file which contains the implementation
> of the __sys_* functions ?

Those are stub functions that invoke the equivalent syscall in the
kernel.  The "${SASM}:" rule in /usr/src/lib/libc/sys/Makefile.inc is
what generates the stubs themselves.  The actual code for most syscalls
in the kernel is in /usr/src/sys/kern/ .

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list