This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] sysdeps/nanosleep: Use clock_nanosleep_time64 if avaliable
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Alistair Francis <alistair dot francis at wdc dot com>
- Cc: <libc-alpha at sourceware dot org>, <lukma at denx dot de>, <alistair23 at gmaill dot com>
- Date: Thu, 17 Oct 2019 15:39:45 +0000
- Subject: Re: [PATCH] sysdeps/nanosleep: Use clock_nanosleep_time64 if avaliable
- Ironport-sdr: Q/TO0jq237wi35SpCduphEFYTAmdpQOwwG/737reaAdwB98ZVHvYmt5dWHIbyOTf8t/jhBpAcl Gp0iDCjjJuA2JbHRv/t71s1VdOfJx3vlsaxe9KPOgF2VsvIjHxBmWT7FWyIDANxLrX0sSPzyxX dhGxXU2Yzja83Yle/zDLPmAorV0x2lGiEAxT2+Z+67FYN0g3LnI43q4nC1PgcGWRxkdVBz/ZW3 GXILQ1ojvJ82DisCN/436jvPy30dI4QocGpKKQ9BT9xOGsQwSHuIe7ToZngR2c16YBeMNYYSIE 7QU=
- Ironport-sdr: eRNcnSgMlLMNW/jJz4ApOVvLK7Am6K378eiGgkgIDNXAA++9kRC2efSYNHakqXODqLHjfC8Z+b wkSCo1ODwZPDIlm0tjbl4zCVRKg0yX7EUUMkNzwJSV+qKm7AVt5u6l5LByLlhQPe9uacfEyU/Z ZtxzPFNg5bHreCOwo0QmbDxziiyPvFlemVlka141RNZCLEXxRoAlBd+EDlXFa8QUT4qSNaeA8V ZtyYannw/kbJM1YJKZFfpsWm3q7VAswdiA47PQSD82t4/tn0tcWInXp4hZPZEgS/D0Tmn2eCJA sKM=
- References: <20191017000829.4462-1-alistair.francis@wdc.com>
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