This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v3 12/23] RISC-V: define __vdso_clock_gettime as __vdso_clock_gettime64 for 32-bit
- From: Arnd Bergmann <arnd at arndb dot de>
- To: Alistair Francis <alistair dot francis at wdc dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Florian Weimer <fweimer at redhat dot com>, Palmer Dabbelt <palmer at sifive dot com>, macro at wdc dot com, Zong Li <zongbox at gmail dot com>, Alistair Francis <alistair23 at gmail dot com>
- Date: Wed, 17 Jul 2019 10:16:28 +0200
- Subject: Re: [RFC v3 12/23] RISC-V: define __vdso_clock_gettime as __vdso_clock_gettime64 for 32-bit
- References: <cover.1563321715.git.alistair.francis@wdc.com> <2b21e47e43bdfb90c035b76e8a2f245e991a1718.1563321715.git.alistair.francis@wdc.com>
On Wed, Jul 17, 2019 at 2:12 AM Alistair Francis
<alistair.francis@wdc.com> wrote:
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
> sysdeps/unix/sysv/linux/riscv/sysdep.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
> index e66e9f032a..ea47b9b82c 100644
> --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h
> +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h
> @@ -171,6 +171,10 @@
> # ifndef __vdso_clock_getres
> # define __vdso_clock_getres __vdso_clock_getres_time64
> # endif
> +
> +# ifndef __vdso_clock_gettime
> +# define __vdso_clock_gettime __vdso_clock_gettime64
> +# endif
> #endif /* __riscv_xlen == 32 */
I had not noticed this when commenting on the other patches. What is
the purpose of doing this?
As mentioned, I don't think we should have __vdso_clock_getres_time64()
at all (no caller cares about this being fast).
The "#define__vdso_clock_gettime __vdso_clock_gettime64" should
be harmless but leads to confusion because other architectures that
have both cannot do this.
Arnd