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/bits/pthreadtypes-arch.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/bits/pthreadtypes-arch.h')
-rw-r--r-- | sysdeps/riscv/nptl/bits/pthreadtypes-arch.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h b/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h index c3c72d6c10..8a602e864a 100644 --- a/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h +++ b/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h @@ -21,18 +21,22 @@ #include <bits/endian.h> -#if __riscv_xlen == 64 -# define __SIZEOF_PTHREAD_ATTR_T 56 -# define __SIZEOF_PTHREAD_MUTEX_T 40 -# define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -# define __SIZEOF_PTHREAD_COND_T 48 -# define __SIZEOF_PTHREAD_CONDATTR_T 4 -# define __SIZEOF_PTHREAD_RWLOCK_T 56 -# define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -# define __SIZEOF_PTHREAD_BARRIER_T 32 -# define __SIZEOF_PTHREAD_BARRIERATTR_T 4 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +#if __WORDSIZE == 64 +# define __SIZEOF_PTHREAD_ATTR_T 56 +# define __SIZEOF_PTHREAD_MUTEX_T 40 +# define __SIZEOF_PTHREAD_RWLOCK_T 56 +# define __SIZEOF_PTHREAD_BARRIER_T 32 #else -# error "rv32i-based systems are not supported" +# define __SIZEOF_PTHREAD_ATTR_T 32 +# define __SIZEOF_PTHREAD_MUTEX_T 32 +# define __SIZEOF_PTHREAD_RWLOCK_T 48 +# define __SIZEOF_PTHREAD_BARRIER_T 20 #endif #define __LOCK_ALIGNMENT |