Where are the OSX (XNU) syscalls actually documented?

ぃ、小莉子 提交于 2021-01-28 02:06:37

问题


I'm looking through the syscalls.master file here but it isn't at all documented. Does documentation for the syscalls exist? If not, why not?

By documentation I mean an actual explanation of what each syscall does and the meanings of the arguments it takes.


回答1:


Apple's position is that the system libraries are the API and stable ABI, syscalls are not. They discourage their direct use, as they can change from release to release of the OS.

So, the best documentation you'll see is the man pages in section 2 or, in some cases, the headers in /usr/include. Of course, you can also look at the XNU sources for the implementations of the syscalls to see how they work.

Note that many of the system calls in syscalls.master are for internal use only and have no documentation. Also, syscalls.master contains only the Unix syscalls, not, for example, the Mach syscalls.



来源:https://stackoverflow.com/questions/53107045/where-are-the-osx-xnu-syscalls-actually-documented

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!