about summary refs log tree commit diff
path: root/sysdeps/riscv/nptl/bits/pthreadtypes-arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/riscv/nptl/bits/pthreadtypes-arch.h')
-rw-r--r--sysdeps/riscv/nptl/bits/pthreadtypes-arch.h26
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