3 ms·
> The only thing you have to do to interact with the OS is make system calls. You can do that without going through the C library. If by "the OS" you mean "Lin
by pcwalton 5y ago
> The only thing you have to do to interact with the OS is make system calls. You can do that without going through the C library.
If by "the OS" you mean "Linux". On Windows, calling syscalls is explicitly unsupported and Microsoft will break you mercilessly by changing syscall IDs between versions. On macOS and iOS, libSystem.dylib is the only supported way to call syscalls; syscalls are SPI and Apple will break you if you try to call them directly. BSDs likewise discourage you from calling syscalls.
The "syscalls are stable API" principle that Linux is famous for is a weird Linux-specific thing; other OS's don't do it.
- jiggawatts 5y agoNot since Windows Server 2022 and Windows 11. To enable the same kind of container image portability between kernel versions that Linux has, Microsoft has decided to stabilise the kernel syscall ABI.
- nrr 5y agoI'd like to read more about this. Do you have additional resources that you can link to?