macos OSX 中 XNU 内核的系统调用列表和文档

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2574903/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 06:51:23  来源:igfitidea点击:

List of and documentation for system calls for XNU kernel in OSX

macosoperating-systemsystem-calls

提问by Daniel Brotherston

I'm trying to figure out how to get a list of and documentation for the system calls available in the XNU kernel in OSX. I've googled around quite a bit, but haven't been able to find anything of use. As I understand the calling conventions match BSD, is that correct?

我试图弄清楚如何获取 OSX 中 XNU 内核中可用系统调用的列表和文档。我在谷歌上搜索了很多,但没有找到任何有用的东西。据我了解,调用约定与 BSD 匹配,对吗?

Thanks

谢谢

采纳答案by Yuji

The "official" list is at Darwin pageat Apple. Specifically, see the file syscalls.masterin the XNU distribution. (If something you expect is missing, try a newer XNU version.)

“官方”列表位于 Apple 的Darwin 页面。具体请参见syscalls.masterXNU 发行版中的文件。(如果缺少您期望的内容,请尝试更新的 XNU 版本。)

The BSD part of the system calls comes from BSD, but there're mach calls which follow quite different conventions.

系统调用的 BSD 部分来自 BSD,但有些 mach 调用遵循完全不同的约定。

You'll definitely want to read Amit Singh's OS X kernel book, see the book's website. It's rewritten for 10.4 and mainly for PPC, but still is the greatest detailed info you can get on the kernel.

您肯定想阅读 Amit Singh 的 OS X 内核书,请访问该书的网站。它已针对 10.4 重写,主要针对 PPC,但仍然是您可以获得的有关内核的最详细信息。