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: [RFC v3 12/23] RISC-V: define __vdso_clock_gettime as __vdso_clock_gettime64 for 32-bit


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


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