3 ms·
glibc has a fallback in the form of the syscall() function, which can be used to invoke any syscall without the need for a wrapper, e.g. syscall(SYS_getcpu
by duskwuff 7y ago
glibc has a fallback in the form of the syscall() function, which can be used to invoke any syscall without the need for a wrapper, e.g.
syscall(SYS_getcpu, &cpu, &node, NULL);
- yjftsjthsd-h 7y agoHow is that different from just calling it yourself?
- duskwuff 7y agoIt means you don't have to deal with the kernel's calling conventions, which are architecture-specific and require inline assembly.