| ▲ | wg0 7 hours ago |
| This is really great resource, didn't know about it. But one question not related to the website above - why the syscalls vary per architecture if the linux API is the same? Or is it I am confusing it with the C standard library/POSIX and assuming that it should be the same everywhere? |
|
| ▲ | guitmz 7 hours ago | parent [-] |
| The Linux kernel API is the same everywhere, but the syscall ABI (numbers, calling convention, entry paths) is specific to a architecture, while it's the C library that wraps those details into the portable POSIX API we code against |
| |
| ▲ | weli 7 hours ago | parent | next [-] | | Also newer archs (riscv) don't support certain syscalls (open, fork) they are still functions you can call under your standard musl,glibc but they inernally call openat, clone. | |
| ▲ | tomtomtom777 6 hours ago | parent | prev [-] | | I see, but why were they numbered differently? Why not use the same numbers? | | |
| ▲ | guitmz 6 hours ago | parent [-] | | As far as I know, the numbers were assigned independently by each port's developers in the 90s as they added calls in their own order. Then it became a frozen ABI nobody could ever renumber, and couldn't have been identical anyway since arches need different syscall variants for things like 32bit vs 64bit types |
|
|