← Back to context

Comment by mgaunard

11 hours ago

clock_gettime is not doing a syscall, it's using vdso.

clock_gettime() goes through the vDSO shim, but whether it avoids a syscall depends on the clock ID and (in some cases) the clock source. For thread-specific CPU user time, the vDSO shim cannot resolve the request in user space and must transit into the kernel. In this specific case, there is absolutely a syscall.