This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[RFC v5 11/21] 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, palmer at sifive 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: Thu, 29 Aug 2019 09:50:29 -0700
- Subject: [RFC v5 11/21] RISC-V: Define __NR_* as __NR_*_time64/64 for 32-bit
- Ironport-sdr: A1LaDBgY/q2j8DZIUg+KM9e8OwUnsKJP7drTQeI/g/sXNWYZvXWxN3kps4sWG1dcV7MdAcbuPq +belegb45FHXiTcVVLWTIINb9LToAJFTUM/8hHR8s039kvndQugSL2O/LjC8rbRPBtlcfXVjHl O+rg8e+hWNgY0ogbMvCtPf3GxXubE5fxGSOYYYs4y3LKfXfyN3TQReZWFMD222csnEcvJCewPH ScCuXoa7c5ZWUd23JM/VYiKKBdf8QRBXGjgv1SrE00w4p4QIhDqOKnceh9xW7zaD5zWWsEsYF3 d4U=
- Ironport-sdr: 9zbuS4OuW6V3I2yGr+BEHJuMHqYdaBdoyRhMPTNcyVoVjAKfv25Vzgox+Eg+W4XlVBGUFq+Qhb hE1GKnpDOABTNpbW+qaSFzTHZdNxLZNg/EMMVu0uuCmBVQq7ATiaKmzYEgUc142Nd84S0fWDDh ubBlIC9Nql40y/3/IoPXShbJHjLAUcqD3JopceU6tuCYxB/qsrSfcr8p7Oen5RUjJ2h7ZLOrv9 l7DT0e6aqsn4wOW9ovGuvItFdgYMNFV6C+egxTyWQhG/c8+enxAoKowyaJfrG6T8gQoDnlUh09 k84nevoiq6et1LV8/lzlwGJv
- Ironport-sdr: DYCjKb25634u9EnBMXXwAKHOTKID8EEhxeKp439OxSPegFfylQnLt1tYxdFe9p1KtE/u86UnZ4 PFg8Gr3qMn865YV4jJrYDH3x5uAN8wFLw7sfs+zv3IGAvhKw/a4x5ssmnwVhQXxVZICj9fP7MW EI5uV2o53RM4E/yRSvgkfeNDRYmSoR6dn8CREn7kMoxdnUMYNz4ixDYlV8QcPK6oStuLwZ7/y4 GmLDG3HZ+HfE4CUXCI2DDdUTmihK/CLJUAZoTY6hapKPqGR8TEXaGtU6PfpRm0gMT5/fVIG0+e 0rc=
- References: <cover.1567097252.git.alistair.francis@wdc.com>
- Wdcironportexception: Internal
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
* sysdeps/unix/sysv/linux/riscv/sysdep.h: Define __NR_* as
__NR_*_time64/64 for 32-bit.
---
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 5470ea3d2a6..169d4152ccd 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.22.0