2 ms·
> it's totally possible to use the microkernely features in userspace right up until you need to do a syscall XNU has two sets of syscalls – Mach syscalls (neg
by skissane 6y ago
> it's totally possible to use the microkernely features in userspace right up until you need to do a syscall
XNU has two sets of syscalls – Mach syscalls (negative syscall numbers) and BSD syscalls (positive syscall numbers). The Mach ones expose the classic Mach "microkernely" API, and the BSD ones provide the traditional POSIX API
The term "syscall" is a bit ambiguous – sometimes it is said that the BSD side has syscalls but the Mach side has traps, other times it is said that BSD syscalls and Mach traps are the two different types of XNU syscalls.
Definitely the BSD syscalls include a bunch invented by Apple themselves (not inherited from *BSD), and I think the same is the case for the Mach traps as well