diff mbox series

[08/18] RISC-V: nptl: update default pthread-offsets.h

Message ID 20200402162939.358617-9-alistair.francis@wdc.com
State New
Headers show
Series glibc port for 32-bit RISC-V (RV32) | expand

Commit Message

Alistair Francis April 2, 2020, 4:29 p.m. UTC
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 mbox series

Patch

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