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 v5] sysdeps/clock_nanosleep: Use clock_nanosleep_time64 if avaliable



On 07/11/2019 16:23, Alistair Francis wrote:
> On Thu, Nov 7, 2019 at 11:15 AM Adhemerval Zanella
> <adhemerval.zanella@linaro.org> wrote:
>>
>>
>>
>> On 07/11/2019 15:11, Alistair Francis wrote:

>>> +# endif /* __NR_clock_nanosleep_time64 */
>>> +  struct timespec ts32, tr32;
>>> +
>>> +  if (! in_time_t_range (req->tv_sec))
>>> +    {
>>> +      __set_errno (EOVERFLOW);
>>> +      return -1;
>>> +    }
>>> +
>>> +  ts32 = valid_timespec64_to_timespec (*req);
>>> +  r =  INTERNAL_SYSCALL_CANCEL (clock_nanosleep, err, clock_id, flags,
>>> +                                &ts32, &tr32);
>>> +
>>> +  if ((r == 0 || errno != ENOSYS) && rem)
>>> +    *rem = valid_timespec_to_timespec64 (tr32);
>>
>> I think we can assume __NR_nanosleep here.
> 
> I'm not sure what you mean

I mean that it does not require to check for ENOSYS.

> 
>>
>>> +#endif /* __ASSUME_TIME64_SYSCALLS */
>>> +
>>>    return (INTERNAL_SYSCALL_ERROR_P (r, err)
>>> -       ? INTERNAL_SYSCALL_ERRNO (r, err) : 0);
>>> +          ? INTERNAL_SYSCALL_ERRNO (r, err) : 0);
>>>  }
>>
>> This is just replacing a tab with spaces, I don't think it is really required.
> 
> It's the only tab in the file. I was cleaning up the indentation while
> touching everything else. I can drop it though.

Afaik glibc code conventions uses tabs for C file indentation (except for some 
imported files).


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