This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[RFC v3 08/23] RISC-V: define __NR_futex as __NR_futex_time64 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: Tue, 16 Jul 2019 17:09:02 -0700
- Subject: [RFC v3 08/23] RISC-V: define __NR_futex as __NR_futex_time64 for 32-bit
- Ironport-sdr: WNz5DYpSh08dQFnHHsbEBeRCRq2xRaJvxp801LfWo1Vz3fr76ZW+jqpff7k9MM/qr6vErAj5M0 ZwSUoQv4jvwjpH4DstlmlnGyfQKeOGO5mzOkNxNm3nRF38c3Ygm4BOK9glG+XpcFMsbp0ndC8x THcR6EVs72QGiBFP0iQf3AFf6f0EYu31zcqq6yjkk8keAmAOUICFHPEjX4aBd5tc1aYP3Xn42d inqnYTTmbmfcMs25VT6S8scyjgRqgpUUbEZ+WW+dnKIRw4q1w6lfkbQzR083H2zipO6nbj70IP L5A=
- Ironport-sdr: AnHk+IPN1u18IS3JilLPtreMyCJB8ZoETzW50K7/J67xgV9xCHVECVt0AbTG3etv71dSgIGrv6 6nR1J5/K3OlDdBk9rBNEJTBfbISDRyNcW5A15JbnlHGKwEDZI5jzjClR0aXRyM/u82wdXkhMWk 66YIkMHaNBdH2VL2/iJEuaSLrV4xkiNJusg1WDAOaQXLGkaiYBKTPjFq8D2SQZpqsu9ooCql4F TOrGYdertfZlKbPbz2x2DwIlkfk4UMTqE/egUIOIZffVOReuECrfazws2CWcR4Med6erYNwZxx SMg72dzeOs/cXaDzAEK3RytF
- Ironport-sdr: Crq/s2Ip75lvKaCwyXOs5BineEhwwrH2gbQHaLz/4Gmi5o6z2TCKy9qX/CZJjZotscVMLWpiEM Ca6kxGxPUGdkCnPm2NFkQfiUc3e8YK+qowtX7PmmylVmblEclK+5guwbRbO5/83wBLL3zufHt6 xz8bh7TZRlg/UVJbZxpNsLp7l1/37WUOoCKBYlXgIEezRuokPyqWSQ2MevrXoRxcOZK4q9qjqY cQs+LV1DXk7bKAcI9dZ3tiYAz9kCaaxm09ofcGJAH4iiqUd/iWvF/sqMOntT5sClI+S031sdI3 K0U=
- References: <cover.1563321715.git.alistair.francis@wdc.com>
The futex syscall isn't avaliable on R32 so let's define it to
be futex_time64 instead.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
sysdeps/unix/sysv/linux/riscv/sysdep.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
index 5470ea3d2a..b7607ef9f1 100644
--- a/sysdeps/unix/sysv/linux/riscv/sysdep.h
+++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h
@@ -116,6 +116,15 @@
#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
+#endif
+
#undef SYS_ify
#define SYS_ify(syscall_name) __NR_##syscall_name
--
2.22.0