This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] sysdeps/nanosleep: Use clock_nanosleep_time64 if avaliable


* Adhemerval Zanella:

> There is no need to replicate all the syscall logic, nanosleep can be implemented
> with __clock_nanosleep.  You can do:
>
> int
> __nanosleep (const struct timespec *requested_time,
>              struct timespec *remaining)
> {
>   int ret = __clock_nanosleep (CLOCK_REALTIME, 0, requested_time, remaining);
>   if (ret != 0)
>     {
>       __set_errno (-ret);
>       return -1;
>     }
>   return ret;
> }

Why the -ret?  I think it should be a plain ret.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]