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