Unix/Linux 系统调用全部或大部分是 POSIX 中的吗?
许多Linux/Unix编程书籍都说POSIX库函数可能是OS系统调用的包装器,也可能不是。例如。http://www.makelinux.net/books/lkd2/ch05lev1sec1 http://www.makelinux.net/books/lkd2/ch05lev1sec1, and https://www.safaribooksonline.com/library/view/understanding-the-linux/0596005652/ch10s01.html https://www.safaribooksonline.com/library/view/understanding-the-linux/0596005652/ch10s01.html
POSIX 的一部分(称为单一 UNIX 规范)定义了 UNIX。因此我认为 POSIX 定义了 Unix(和 Linux)的系统调用。
那么Unix/Linux系统调用是POSIX库函数的一部分吗?
Thanks.
Linux 系统调用列于系统调用(2) http://man7.org/linux/man-pages/man2/syscalls.2.html。大多数是 POSIX,但有些是特定于 Linux 的(例如信号fd(2) http://man7.org/linux/man-pages/man2/signalfd.2.html, ETC...)。 POSIX 是一个规格并且不“知道”syscalls https://en.wikipedia.org/wiki/System_call(在 POSIX 视图中,这是一个实现细节)。
有些函数在 POSIX 中标准化,但在 Linux 库代码中实现,例如dlopen(3) http://man7.org/linux/man-pages/man3/dlopen.3.html(参见 POSIXdlopen http://pubs.opengroup.org/onlinepubs/9699919799/) 建立在上面mmap(2) http://man7.org/linux/man-pages/man2/mmap.2.html...
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)