openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/glibc/2.29-r0/git/sysdeps/unix/sysv/linux/clock_nanosleep.c
int __clock_nanosleep(clockid_t clock_id, int flags, const struct timespec* req,
                      struct timespec* rem)
{
    if (clock_id == CLOCK_THREAD_CPUTIME_ID)
        return EINVAL;
    if (clock_id == CLOCK_PROCESS_CPUTIME_ID)
        clock_id = MAKE_PROCESS_CPUCLOCK(0, CPUCLOCK_SCHED);

    /* If the call is interrupted by a signal handler or encounters an error,
       it returns a positive value similar to errno.  */
    INTERNAL_SYSCALL_DECL(err);
    int r = INTERNAL_SYSCALL_CANCEL(clock_nanosleep, err, clock_id, flags, req,
                                    rem);
    return (INTERNAL_SYSCALL_ERROR_P(r, err) ? INTERNAL_SYSCALL_ERRNO(r, err)
                                             : 0);
}
/* We can simply use the syscall.  The CPU clocks are not supported
   with this function.  */
We can simply use the syscall.  The CPU clocks are not supported
with this function.
We can simply use the syscall . The CPU clocks are not supported with this function .
int __clock_nanosleep(clockid_t clock_id, int flags, const struct timespec* req,
                      struct timespec* rem)
{
    if (clock_id == CLOCK_THREAD_CPUTIME_ID)
        return EINVAL;
    if (clock_id == CLOCK_PROCESS_CPUTIME_ID)
        clock_id = MAKE_PROCESS_CPUCLOCK(0, CPUCLOCK_SCHED);
    INTERNAL_SYSCALL_DECL(err);
    int r = INTERNAL_SYSCALL_CANCEL(clock_nanosleep, err, clock_id, flags, req,
                                    rem);
    return (INTERNAL_SYSCALL_ERROR_P(r, err) ? INTERNAL_SYSCALL_ERRNO(r, err)
                                             : 0);
}
int __clock_nanosleep ( clockid_t clock_id , int flags , const struct timespec * req , struct timespec * rem ) { if ( clock_id == CLOCK_THREAD_CPUTIME_ID ) return EINVAL ; if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) clock_id = MAKE_PROCESS_CPUCLOCK ( 0 , CPUCLOCK_SCHED ) ; INTERNAL_SYSCALL_DECL ( err ) ; int r = INTERNAL_SYSCALL_CANCEL ( clock_nanosleep , err , clock_id , flags , req , rem ) ; return ( INTERNAL_SYSCALL_ERROR_P ( r , err ) ? INTERNAL_SYSCALL_ERRNO ( r , err ) : 0 ) ; }
We can simply use the syscall.
We can simply use the syscall .
/* If the call is interrupted by a signal handler or encounters an error,
       it returns a positive value similar to errno.  */