diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2020-02-10 10:36:21 -0800 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2020-08-27 08:17:42 -0700 |
commit | 5b6113d62efabb123db433b14adddd4a5fb6b7ec (patch) | |
tree | 1959bde3e74c6e491bbce89f0f8e1806647c9225 /sysdeps/riscv/nptl/pthread-offsets.h | |
parent | 07598d76006faec6c60a9d86bda44dcb81b3a743 (diff) | |
download | glibc-5b6113d62efabb123db433b14adddd4a5fb6b7ec.tar.gz glibc-5b6113d62efabb123db433b14adddd4a5fb6b7ec.tar.xz glibc-5b6113d62efabb123db433b14adddd4a5fb6b7ec.zip |
RISC-V: Support the 32-bit ABI implementation
This patch adds the ABI implementation for 32-bit RISC-V. It contains the Linux-specific and RISC-V architecture code. Reviewed-by: Maciej W. Rozycki <macro@wdc.com>
Diffstat (limited to 'sysdeps/riscv/nptl/pthread-offsets.h')
-rw-r--r-- | sysdeps/riscv/nptl/pthread-offsets.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sysdeps/riscv/nptl/pthread-offsets.h b/sysdeps/riscv/nptl/pthread-offsets.h index 31f0587bec..d76c6cfb95 100644 --- a/sysdeps/riscv/nptl/pthread-offsets.h +++ b/sysdeps/riscv/nptl/pthread-offsets.h @@ -1,3 +1,16 @@ -#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 +# if __BYTE_ORDER == __BIG_ENDIAN +# define __PTHREAD_RWLOCK_FLAGS_OFFSET 27 +# else +# define __PTHREAD_RWLOCK_FLAGS_OFFSET 24 +# endif +#endif |