arrfab / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1505492-undef-13.patch

147e83
commit 01f8eac224421f07f28f91cc05db7459ea433ea4
147e83
Author: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
147e83
Date:   Wed Mar 26 13:48:00 2014 -0500
147e83
147e83
    Move __PTHREAD_SPINS definition to architecture specific header
147e83
    
147e83
    This patch moves the __PTHREAD_SPINS definition to arch specific header
147e83
    since pthread_mutex_t layout is also arch specific.  This leads to no
147e83
    need to defining __PTHREAD_MUTEX_HAVE_ELISION and thus removing of the
147e83
    undefined compiler warning.
147e83
147e83
Conflicts:
147e83
	nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
147e83
	  (Textual conflict due to glibc-rh841653-3.patch.)
147e83
	sysdeps/unix/sysv/linux/microblaze/nptl/bits/pthreadtypes.h
147e83
	  (No microblaze port in our tree; file removed manually.)
147e83
147e83
In addition, nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
147e83
was adjusted for the separate HTM backport in glibc-rh731835-0.patch.
147e83
147e83
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
147e83
index 1242a9c1fd12ed3e..82994942710f3b02 100644
147e83
--- a/nptl/sysdeps/pthread/pthread.h
147e83
+++ b/nptl/sysdeps/pthread/pthread.h
147e83
@@ -82,15 +82,6 @@ enum
147e83
 #endif
147e83
 
147e83
 
147e83
-/* Mutex initializers.  */
147e83
-#if __PTHREAD_MUTEX_HAVE_ELISION == 1 /* 64bit layout.  */
147e83
-#define __PTHREAD_SPINS 0, 0
147e83
-#elif __PTHREAD_MUTEX_HAVE_ELISION == 2 /* 32bit layout.  */
147e83
-#define __PTHREAD_SPINS { 0, 0 }
147e83
-#else
147e83
-#define __PTHREAD_SPINS 0
147e83
-#endif
147e83
-
147e83
 #ifdef __PTHREAD_MUTEX_HAVE_PREV
147e83
 # define PTHREAD_MUTEX_INITIALIZER \
147e83
   { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
147e83
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
147e83
index 1a8f45aa5286f919..64752ef8f9199f73 100644
147e83
--- a/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
147e83
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
147e83
@@ -95,7 +95,6 @@ typedef union
147e83
     __pthread_list_t __list;
147e83
 # define __PTHREAD_MUTEX_HAVE_PREV	1
147e83
 # define __PTHREAD_SPINS             0, 0
147e83
-# define __PTHREAD_MUTEX_HAVE_ELISION	1
147e83
 #else
147e83
     unsigned int __nusers;
147e83
     __extension__ union
147e83
@@ -107,7 +106,6 @@ typedef union
147e83
 # define __spins __elision_data.__espins
147e83
 # define __elision __elision_data.__elision
147e83
 # define __PTHREAD_SPINS         { 0, 0 }
147e83
-# define __PTHREAD_MUTEX_HAVE_ELISION	2
147e83
       } __elision_data;
147e83
       __pthread_slist_t __list;
147e83
     };
147e83
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
147e83
index 2f80fa9b69826d8b..dc4ee2ed55f10854 100644
147e83
--- a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
147e83
+++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
147e83
@@ -105,6 +105,9 @@ typedef union
147e83
   long int __align;
147e83
 } pthread_mutex_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 typedef union
147e83
 {
147e83
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
147e83
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
147e83
index ce8bd713b4adc3ce..3b73352389c1ed5b 100644
147e83
--- a/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
147e83
+++ b/nptl/sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
147e83
@@ -77,6 +77,9 @@ typedef union
147e83
   long int __align;
147e83
 } pthread_mutex_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 typedef union
147e83
 {
147e83
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
147e83
diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
147e83
index cc95367a61158a91..52722b8890b5b356 100644
147e83
--- a/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
147e83
+++ b/nptl/sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
147e83
@@ -106,6 +106,9 @@ typedef union
147e83
   long int __align;
147e83
 } pthread_mutex_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 typedef union
147e83
 {
147e83
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
147e83
diff --git a/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
147e83
index 2704fd8b75eef76b..9d0f304223929ca5 100644
147e83
--- a/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
147e83
+++ b/nptl/sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h
147e83
@@ -105,7 +105,8 @@ typedef union
147e83
     short __elision;
147e83
     __pthread_list_t __list;
147e83
 # define __PTHREAD_MUTEX_HAVE_PREV	1
147e83
-# define __PTHREAD_MUTEX_HAVE_ELISION   1
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+# define __PTHREAD_SPINS             0, 0
147e83
 #else
147e83
     unsigned int __nusers;
147e83
     __extension__ union
147e83
@@ -116,7 +117,7 @@ typedef union
147e83
 	short __elision;
147e83
 # define __spins __elision_data.__espins
147e83
 # define __elision __elision_data.__elision
147e83
-# define __PTHREAD_MUTEX_HAVE_ELISION   2
147e83
+# define __PTHREAD_SPINS         { 0, 0 }
147e83
       } __elision_data;
147e83
       __pthread_slist_t __list;
147e83
     };
147e83
diff --git a/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
147e83
index caa9f37999dde798..bd8d41493609dcdf 100644
147e83
--- a/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
147e83
+++ b/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
147e83
@@ -94,6 +94,9 @@ typedef union
147e83
   long int __align;
147e83
 } pthread_mutex_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 typedef union
147e83
 {
147e83
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
147e83
diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h
147e83
index eed8365c37b20953..ca71ccc5379941e5 100644
147e83
--- a/sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h
147e83
+++ b/sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h
147e83
@@ -74,6 +74,9 @@ typedef union
147e83
   long int __align;
147e83
 } pthread_mutex_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 typedef union
147e83
 {
147e83
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
147e83
diff --git a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
147e83
index 98479495a884da2b..fe1afc32049c70e5 100644
147e83
--- a/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
147e83
+++ b/sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
147e83
@@ -73,6 +73,9 @@ typedef union
147e83
   long int __align;
147e83
 } pthread_mutex_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 typedef union
147e83
 {
147e83
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
147e83
diff --git a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
147e83
index 5e4402088c2a5be1..0e3334fd29723b6a 100644
147e83
--- a/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
147e83
+++ b/sysdeps/unix/sysv/linux/arm/nptl/bits/pthreadtypes.h
147e83
@@ -77,6 +77,9 @@ typedef union
147e83
   long int __align;
147e83
 } pthread_mutex_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 typedef union
147e83
 {
147e83
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
147e83
diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h
147e83
index 5b30713069a439d7..5bf9ff4f77c1b574 100644
147e83
--- a/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h
147e83
+++ b/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h
147e83
@@ -74,6 +74,9 @@ typedef union
147e83
   long int __align;
147e83
 } pthread_mutex_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 typedef union
147e83
 {
147e83
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
147e83
diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
147e83
index 7bcec6a011dd6183..af9c0de441e44ede 100644
147e83
--- a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
147e83
+++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
147e83
@@ -77,6 +77,9 @@ typedef union
147e83
   long int __align;
147e83
 } pthread_mutex_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 typedef union
147e83
 {
147e83
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
147e83
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
147e83
index 2fda0d30cd909d67..e133abc9afbe60b2 100644
147e83
--- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
147e83
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
147e83
@@ -106,6 +106,9 @@ typedef union
147e83
   long int __align;
147e83
 } pthread_mutex_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 typedef union
147e83
 {
147e83
   char __size[__SIZEOF_PTHREAD_MUTEXATTR_T];
147e83
diff --git a/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h
147e83
index ac51e3b93c84c63b..4a92dd2a279fa90d 100644
147e83
--- a/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h
147e83
+++ b/sysdeps/unix/sysv/linux/tile/nptl/bits/pthreadtypes.h
147e83
@@ -112,6 +112,9 @@ typedef union
147e83
   int __align;
147e83
 } pthread_mutexattr_t;
147e83
 
147e83
+/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER.  */
147e83
+#define __PTHREAD_SPINS 0
147e83
+
147e83
 
147e83
 /* Data structure for conditional variable handling.  The structure of
147e83
    the attribute type is not exposed on purpose.  */