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


On Wed, 16 Oct 2019, Alistair Francis wrote:

> diff --git a/nptl/thrd_sleep.c b/nptl/thrd_sleep.c
> index 2e185dd748e..bd9373b1f61 100644
> --- a/nptl/thrd_sleep.c
> +++ b/nptl/thrd_sleep.c
> @@ -22,18 +22,79 @@
>  #include "thrd_priv.h"
>  
>  int
> -thrd_sleep (const struct timespec* time_point, struct timespec* remaining)
> +__thrd_sleep_time64 (const struct __timespec64* time_point, struct __timespec64* remaining)
>  {
>    INTERNAL_SYSCALL_DECL (err);
> -  int ret = INTERNAL_SYSCALL_CANCEL (nanosleep, err, time_point, remaining);
> +  int ret = -1;
> +
> +#ifdef __ASSUME_TIME64_SYSCALLS

I'd prefer any file using __ASSUME_* macros to include <kernel-features.h> 
explicitly.  I think you're getting it here indirectly via 
sysdep-cancel.h which includes sysdep.h, but I don't think it should be 
defined as part of the API of sysdep-cancel.h that it must include 
kernel-features.h, and until we move __ASSUME_* to being 0/1 rather than 
undefined/defined, a missing include would just quietly mean the code 
isn't built as intended.

The same applies to any other files with __ASSUME_* uses added in this or 
other patches.

-- 
Joseph S. Myers
joseph@codesourcery.com


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