Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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?

Thanks

like image 812
Daniel Brotherston Avatar asked Apr 04 '10 15:04

Daniel Brotherston


People also ask

How does system call interact with kernel?

A system call is a way for programs to interact with the operating system. A computer program makes a system call when it makes a request to the operating system's kernel. System call provides the services of the operating system to the user programs via Application Program Interface(API).

How does the kernel know which system call has been made?

The kernel doesn't monitor the process to detect a system call. Instead, the process generates an interrupt which transfers control to the kernel, because that's what software-generated interrupts do according to the instruction set reference manual.

What is Syscall emulation?

System calls are the most critical interface of all user space software. They are the means of invoking kernel's functionality. Without them, software would not be able to communicate with the user, access the file system or establish network connections.

What are Linux system calls?

A system call is a programmatic way a program requests a service from the kernel, and strace is a powerful tool that allows you to trace the thin layer between user processes and the Linux kernel. To understand how an operating system works, you first need to understand how system calls work.


1 Answers

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

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

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.

like image 112
Yuji Avatar answered Sep 25 '22 00:09

Yuji