POSIX does not define the internal structure of the kernel, the kernel interface for the user, or even libc. Indeed, even Windows has a POSIX compatible subsystem. Just make sure that the POSIX interfaces defined in your link work somehow. Please note, however, that POSIX does not require any specific functions in the kernel - you can implement things in the C library using, if possible, simpler kernel interfaces of your own design.
It so happened that many POSIX-compatible operating systems (BSD, Linux, etc.) have a fairly close relationship between many of these calls and the kernel level, but there are exceptions. For example, on Linux, the write() call is a direct syscall, calling the sys_write() function in the kernel. However, on Windows, write() is implemented in POSIX DLL support, which translates a file descriptor into an NT descriptor and calls NtWriteFile() for maintenance; it, in turn, calls the corresponding system call in ntoskrnl.exe . Thus, you have a lot of freedom in how to do something that complicates the situation :)
bdonlan
source share