diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-03-26 13:48:00 -0500 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-04-09 06:41:44 -0500 |
commit | 01f8eac224421f07f28f91cc05db7459ea433ea4 (patch) | |
tree | 41e8a2952b7adfbd25daebcba10036f1be3ddfca /nptl | |
parent | de21c33c068c8e39afb5711613a7c083c11ce6a1 (diff) | |
download | glibc-01f8eac224421f07f28f91cc05db7459ea433ea4.tar.gz glibc-01f8eac224421f07f28f91cc05db7459ea433ea4.tar.xz glibc-01f8eac224421f07f28f91cc05db7459ea433ea4.zip |
Move __PTHREAD_SPINS definition to architecture specific header
This patch moves the __PTHREAD_SPINS definition to arch specific header since pthread_mutex_t layout is also arch specific. This leads to no need to defining __PTHREAD_MUTEX_HAVE_ELISION and thus removing of the undefined compiler warning.
Diffstat (limited to 'nptl')
6 files changed, 15 insertions, 13 deletions
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h index 1e0c5dc937..40a3e215cc 100644 --- a/nptl/sysdeps/pthread/pthread.h +++ b/nptl/sysdeps/pthread/pthread.h @@ -82,15 +82,6 @@ enum #endif -/* Mutex initializers. */ -#if __PTHREAD_MUTEX_HAVE_ELISION == 1 /* 64bit layout. */ -#define __PTHREAD_SPINS 0, 0 -#elif __PTHREAD_MUTEX_HAVE_ELISION == 2 /* 32bit layout. */ -#define __PTHREAD_SPINS { 0, 0 } -#else -#define __PTHREAD_SPINS 0 -#endif - #ifdef __PTHREAD_MUTEX_HAVE_PREV # define PTHREAD_MUTEX_INITIALIZER \ { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } } diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h index 71bd3aed12..eda3d1a3e4 100644 --- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h @@ -106,6 +106,9 @@ typedef union long int __align; } pthread_mutex_t; +/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ +#define __PTHREAD_SPINS 0 + typedef union { char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h index 23a16988c3..8264de0591 100644 --- a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h @@ -20,8 +20,6 @@ #include <bits/wordsize.h> -# define __PTHREAD_MUTEX_HAVE_ELISION 0 - #if __WORDSIZE == 64 # define __SIZEOF_PTHREAD_ATTR_T 56 # define __SIZEOF_PTHREAD_MUTEX_T 40 @@ -107,6 +105,9 @@ typedef union long int __align; } pthread_mutex_t; +/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ +#define __PTHREAD_SPINS 0 + typedef union { char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; diff --git a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h index e42d94ebc0..a177f28347 100644 --- a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h @@ -77,6 +77,9 @@ typedef union long int __align; } pthread_mutex_t; +/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ +#define __PTHREAD_SPINS 0 + typedef union { char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h index be615b6e89..8c0340a963 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h @@ -106,6 +106,9 @@ typedef union long int __align; } pthread_mutex_t; +/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ +#define __PTHREAD_SPINS 0 + typedef union { char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; diff --git a/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h index 28e5144788..b4329f652b 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h +++ b/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h @@ -105,7 +105,8 @@ typedef union short __elision; __pthread_list_t __list; # define __PTHREAD_MUTEX_HAVE_PREV 1 -# define __PTHREAD_MUTEX_HAVE_ELISION 1 +/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ +# define __PTHREAD_SPINS 0, 0 #else unsigned int __nusers; __extension__ union @@ -116,7 +117,7 @@ typedef union short __elision; # define __spins d.__espins # define __elision d.__elision -# define __PTHREAD_MUTEX_HAVE_ELISION 2 +# define __PTHREAD_SPINS { 0, 0 } } d; __pthread_slist_t __list; }; |