| 1 | /* Copyright (C) 2002-2020 Free Software Foundation, Inc.  |
| 2 | This file is part of the GNU C Library.  |
| 3 |   |
| 4 | The GNU C Library is free software; you can redistribute it and/or  |
| 5 | modify it under the terms of the GNU Lesser General Public  |
| 6 | License as published by the Free Software Foundation; either  |
| 7 | version 2.1 of the License, or (at your option) any later version.  |
| 8 |   |
| 9 | The GNU C Library is distributed in the hope that it will be useful,  |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of  |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU  |
| 12 | Lesser General Public License for more details.  |
| 13 |   |
| 14 | You should have received a copy of the GNU Lesser General Public  |
| 15 | License along with the GNU C Library; if not, see  |
| 16 | <https://www.gnu.org/licenses/>. */  |
| 17 |   |
| 18 | #ifndef _BITS_PTHREADTYPES_ARCH_H  |
| 19 | #define _BITS_PTHREADTYPES_ARCH_H 1  |
| 20 |   |
| 21 | #include <bits/wordsize.h>  |
| 22 |   |
| 23 | #ifdef __x86_64__  |
| 24 | # if __WORDSIZE == 64  |
| 25 | # define __SIZEOF_PTHREAD_MUTEX_T 40  |
| 26 | # define __SIZEOF_PTHREAD_ATTR_T 56  |
| 27 | # define __SIZEOF_PTHREAD_RWLOCK_T 56  |
| 28 | # define __SIZEOF_PTHREAD_BARRIER_T 32  |
| 29 | # else  |
| 30 | # define __SIZEOF_PTHREAD_MUTEX_T 32  |
| 31 | # define __SIZEOF_PTHREAD_ATTR_T 32  |
| 32 | # define __SIZEOF_PTHREAD_RWLOCK_T 44  |
| 33 | # define __SIZEOF_PTHREAD_BARRIER_T 20  |
| 34 | # endif  |
| 35 | #else  |
| 36 | # define __SIZEOF_PTHREAD_MUTEX_T 24  |
| 37 | # define __SIZEOF_PTHREAD_ATTR_T 36  |
| 38 | # define __SIZEOF_PTHREAD_RWLOCK_T 32  |
| 39 | # define __SIZEOF_PTHREAD_BARRIER_T 20  |
| 40 | #endif  |
| 41 | #define __SIZEOF_PTHREAD_MUTEXATTR_T 4  |
| 42 | #define __SIZEOF_PTHREAD_COND_T 48  |
| 43 | #define __SIZEOF_PTHREAD_CONDATTR_T 4  |
| 44 | #define __SIZEOF_PTHREAD_RWLOCKATTR_T 8  |
| 45 | #define __SIZEOF_PTHREAD_BARRIERATTR_T 4  |
| 46 |   |
| 47 | #define __LOCK_ALIGNMENT  |
| 48 | #define __ONCE_ALIGNMENT  |
| 49 |   |
| 50 | #ifndef __x86_64__  |
| 51 | /* Extra attributes for the cleanup functions. */  |
| 52 | # define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))  |
| 53 | #endif  |
| 54 |   |
| 55 | #endif /* bits/pthreadtypes.h */  |
| 56 | |