BSD syscall
API
The syscall
API is the traditional UNIX way of calling kernel functions from user space. Its implementation varies from one part of the kernel to the next, however, and it is completely unsupported for loadable modules. For this reason, it is not a recommended way of getting data into or out of the kernel in Mac OS X unless you are writing a file system.
File systems have to support a number of standard system calls (for example, mount
), but do so by means of generic file system routines that call the appropriate file-system functions. Thus, if you are writing a file system, you need to implement those functions, but you do not need to write the code that handles the system calls directly. For more information on implementing syscall
support in file systems, see the chapter “File Systems Overview”.