[RFC v3 12/23] RISC-V: define __vdso_clock_gettime as __vdso_clock_gettime64 for 32-bit
Arnd Bergmann
arnd@arndb.de
Wed Jul 17 08:16:00 GMT 2019
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
More information about the Libc-alpha
mailing list