[PATCH 2/6] linux: Assume clock_getres CLOCK_{PROCESS,THREAD}_CPUTIME_ID

Florian Weimer fw@deneb.enyo.de
Tue Feb 12 21:13:00 GMT 2019


* Adhemerval Zanella:

>> It may make sense to add a note to check_clock_getres that we use
>> INTERNAL_SYSCALL_CALL to avoid setting errno, so that the call can use
>> errno to check whether sysconf recognized the parameter constant at all.
>
> Ack, I added:
>
>   /* Avoid setting errno so it can check whether the kernel supports
>      the CLK_ID.  */
>
> As a side note I think we can also use INLINE_SYCALL_CALL and check
> for EINVAL.

Sorry, what I meant is that the caller might want to set errno to 0
and check this way if sysconf actually recognizes the passed _SC_*
parameter.

At least that's why I think INLINE_SYCALL_CALL is used here.



More information about the Libc-alpha mailing list