syscall function is not syscall

Jonathan Wakely jwakely@redhat.com
Mon Nov 16 10:02:18 GMT 2020


On 16/11/20 06:47 +0000, sotrdg sotrdg via Libstdc++ wrote:
>syscall function will introduce dependency of libc and set errno which is a problem. It brings zero benefit compared to call these functions from glibc directly.

We use two syscalls, SYS_futex and SYS_clock_gettime.

SYS_futex cannot be called via glibc, because there is no futex
function.

SYS_clock_gettime is only use for old versions of glibc where the
clock_gettime function is not present in libc but in librt, which we
don't want to depend on.

So there are benefits, you're just not aware of them, and as usual
just state your opinion as fact. It's not helpful.

Also, both those syscalls were already being used, and are only used
when available, so they don't introduce any dependency on libc. That
dependency already exists.





More information about the Libstdc++ mailing list