4 ms·
That is completely untrue. While the BSD syscalls are supported, Mach syscalls and Mach IPC are also heavily used, especially internally at Apple. Just one sim
by simscitizen 10y ago
That is completely untrue. While the BSD syscalls are supported, Mach syscalls and Mach IPC are also heavily used, especially internally at Apple.
Just one simple example: run "sample <process>" (where <process> is any Cocoa application) on OS X. Pretty much every thread will have an event loop powered by CFRunLoop, and they'll all be stuck in mach_msg_trap waiting for an event to occur.
Also, pretty much any sort of semi-complicated IPC on OS X is done over Mach IPC (e.g. passing a large bitmap copy-on-write from one process to another). Take a look at the ipc directory in the Chromium source, for example.
- rayiner 10y agoYes, I'd assume it's more heavily used in the higher-level application layer. I was talking about basic UNIX functions.
- swolchok 10y agoEven Unix signals are delivered as Mach exceptions first. If the process doesn't have a Mach exception handler set up, the kernel's exception handler converts them to Unix signals and tries delivery that way: https://github.com/opensource-apple/xnu/blob/27ffc00f33925b582391b1ef318b78b8bd3939d1/bsd/uxkern/ux_exception.c#L428 https://github.com/opensource-apple/xnu/blob/27ffc00f33925b5... and https://github.com/opensource-apple/xnu/blob/27ffc00f33925b582391b1ef318b78b8bd3939d1/bsd/dev/i386/unix_signal.c#L775 https://github.com/opensource-apple/xnu/blob/27ffc00f33925b5...
- deleted 10y ago[deleted]