3 ms·
One reason (may not be their main one) could be that system calls have more overhead than function calls, and some things (like futexes) make more sense to impl
by dataflow 4y ago
One reason (may not be their main one) could be that system calls have more overhead than function calls, and some things (like futexes) make more sense to implement on the userspace side. As another example, imagine a function for measuring time. You don't want that to be a system call if it's meant to be efficient, and when a better mechanism comes along, changing the implementation on the user space side is a lot easier and potentially more efficient if the kernel interface can be changed without breaking compatibility.