This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[RFC v6 08/23] RISC-V: Define __NR_* as __NR_*_time64/64 for 32-bit
- From: Alistair Francis <alistair dot francis at wdc dot com>
- To: libc-alpha at sourceware dot org
- Cc: arnd at arndb dot de, adhemerval dot zanella at linaro dot org, fweimer at redhat dot com, joseph at codesourcery dot com, palmerdabbelt at google dot com, macro at wdc dot com, zongbox at gmail dot com, alistair dot francis at wdc dot com, alistair23 at gmail dot com
- Date: Sun, 12 Jan 2020 02:33:52 -0800
- Subject: [RFC v6 08/23] RISC-V: Define __NR_* as __NR_*_time64/64 for 32-bit
- Ironport-sdr: D907W15nmUlGbuDFBuXUYHKyEj04VdIi/IxpNvH6JavAlhtzzaze7hbrgT2YFhKtWVuUrG+vIy YBwe1afOsSfHT0QjHOOMZC9mnjBj1Cs4Laf5Duvx5+eVTld/ulnRYo22dKOMpTK2s8oa7U5O3o gMC0DO1zVW7Tcf/Gcb4/+UiMnTZuGuWLVEZpgeS1k3SdZoOBWD6MyUIm2FJw6zVPZIeIjXVbGv ekhifrFoS3pP4LHn+4nJO62ZApao8pL2vgKRWCjMaB3hDHnctbcd6zBv6BSHw5hxgaR01GHZ0X zCU=
- Ironport-sdr: BUewa7F60cz1rFnMBXKSoirlmnfZVQZTDsdf63csgFhyck6Ex175lCdWks60dSKx3I6jA2kU3A 5k6UoidA3i0fGJQyCHP+J7MqlEsC0jeUHiPmOMexkVXeTKDN2x+eZUQkAQoX/zXTlIRbrDb629 6TpbcrAACbvBOnay8a3TBnYnzjgGXJExFJv4S7pX2nrHweTpGTV4/sTB6NhuZjYf6ukRKhiwc/ N0nDHgYTDrtuaxM4lz9AmfwNzDuJBMQAQZdeojeRZlsT42Yt2sBSbsH/KbPSKW5MclQbBy05/T WUtFHoBVsjkiofrQZRPdmxmH
- Ironport-sdr: XzvAOb6brUYsD+w0gaLzsMFxkNQFKvGYtnIYlL57s4izAklomL3GPdaEhw7dQhyPZZ0GvBeXbo WyF0R2QqNnCiKcS+DAp7MyL6GCqL6yanUdVlF6Z4D8JMMsG5LNrbMKG9tWBd0fINYhUDmh21sn 6nuGf1+kUtyRtCLJonxDwBk1yvL/GFPn74C3qmtkxohH5Bcsz89hePEfT+NHg+0Taw3isu4NPO e4QexOvG4bm1o3FQ6vAJFhRxCjYqDodJ4TPYQgEPkD6iZtKR4oqVyK2MFiP4zRRl5zm1SE2LGZ jhw=
- References: <cover.1578824547.git.alistair.francis@wdc.com>
- Wdcironportexception: Internal
---
sysdeps/unix/sysv/linux/riscv/sysdep.h | 73 ++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
index 201bf9a91b..d030bf0db0 100644
--- a/sysdeps/unix/sysv/linux/riscv/sysdep.h
+++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h
@@ -116,6 +116,79 @@
#include <sysdeps/unix/sysdep.h>
+#if __riscv_xlen == 32
+/* Define the __NR_futex as __NR_futex64 as RV32 doesn't have a
+ * __NR_futex syscall.
+ */
+# ifndef __NR_futex
+# define __NR_futex __NR_futex_time64
+# endif
+
+# ifndef __NR_rt_sigtimedwait
+# define __NR_rt_sigtimedwait __NR_rt_sigtimedwait_time64
+# endif
+
+# ifndef __NR_ppoll
+# define __NR_ppoll __NR_ppoll_time64
+# endif
+
+# ifndef __NR_utimensat
+# define __NR_utimensat __NR_utimensat_time64
+# endif
+
+# ifndef __NR_pselect6
+# define __NR_pselect6 __NR_pselect6_time64
+# endif
+
+# ifndef __NR_recvmmsg
+# define __NR_recvmmsg __NR_recvmmsg_time64
+# endif
+
+# ifndef __NR_semtimedop
+# define __NR_semtimedop __NR_semtimedop_time64
+# endif
+
+# ifndef __NR_mq_timedreceive
+# define __NR_mq_timedreceive __NR_mq_timedreceive_time64
+# endif
+
+# ifndef __NR_mq_timedsend
+# define __NR_mq_timedsend __NR_mq_timedsend_time64
+# endif
+
+# ifndef __NR_timer_gettime
+# define __NR_timer_gettime __NR_timer_gettime64
+# endif
+
+# ifndef __NR_timer_settime
+# define __NR_timer_settime __NR_timer_settime64
+# endif
+
+# ifndef __NR_clock_getres
+# define __NR_clock_getres __NR_clock_getres_time64
+# endif
+
+# ifndef __NR_clock_gettime
+# define __NR_clock_gettime __NR_clock_gettime64
+# endif
+
+# ifndef __NR_timerfd_settime
+# define __NR_timerfd_settime __NR_timerfd_settime64
+# endif
+
+# ifndef __NR_timerfd_gettime
+# define __NR_timerfd_gettime __NR_timerfd_gettime64
+# endif
+
+# ifndef __NR_sched_rr_get_interval
+# define __NR_sched_rr_get_interval __NR_sched_rr_get_interval_time64
+# endif
+
+# ifndef __NR_clock_adjtime
+# define __NR_clock_adjtime __NR_clock_adjtime64
+# endif
+#endif /* __riscv_xlen == 32 */
+
#undef SYS_ify
#define SYS_ify(syscall_name) __NR_##syscall_name
--
2.24.1