[PATCH 08/18] RISC-V: nptl: update default pthread-offsets.h
Alistair Francis
alistair.francis@wdc.com
Thu Apr 2 16:29:38 GMT 2020
Update the RISC-V pthread-offsets.h values to support RV32.
---
sysdeps/riscv/nptl/pthread-offsets.h | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/sysdeps/riscv/nptl/pthread-offsets.h b/sysdeps/riscv/nptl/pthread-offsets.h
index 31f0587bec..a85c752a1f 100644
--- a/sysdeps/riscv/nptl/pthread-offsets.h
+++ b/sysdeps/riscv/nptl/pthread-offsets.h
@@ -1,3 +1,12 @@
-#define __PTHREAD_MUTEX_KIND_OFFSET 16
+#if __WORDSIZE == 64
+# define __PTHREAD_MUTEX_KIND_OFFSET 16
+#else
+# define __PTHREAD_MUTEX_KIND_OFFSET 12
+#endif
-#define __PTHREAD_RWLOCK_FLAGS_OFFSET 48
+
+#if __WORDSIZE == 64
+# define __PTHREAD_RWLOCK_FLAGS_OFFSET 48
+#else
+# define __PTHREAD_RWLOCK_FLAGS_OFFSET 24
+#endif
--
2.26.0
More information about the Libc-alpha
mailing list