summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-11-07 20:58:41 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-11-26 13:53:36 +0000
commit71d260c1077ce7ab1530809fc826756bdcd032b0 (patch)
treedbd30cdc6015415b34e6fd483c6a6186093c75ba /sysdeps
parent7fc8c286e31a336caa008a8bcfb00aac1e47cdc8 (diff)
downloadglibc-71d260c1077ce7ab1530809fc826756bdcd032b0.tar.gz
nptl: Cleanup mutex internal offset tests
The offsets of pthread_mutex_t __data.__nusers, __data.__spins, __data.elision, __data.list are not required to be constant over the releases. Only the __data.__kind is used for static initializers. This patch also adds an additional size check for __data.__kind. Checked with a build against affected ABIs. Change-Id: I7a4e48cc91b4c4ada57e9a5d1b151fb702bfaa9f
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/aarch64/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/alpha/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/arm/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/csky/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/hppa/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/i386/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/ia64/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/m68k/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/microblaze/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/mips/nptl/pthread-offsets.h8
-rw-r--r--sysdeps/nios2/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/powerpc/nptl/pthread-offsets.h8
-rw-r--r--sysdeps/riscv/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/s390/nptl/pthread-offsets.h8
-rw-r--r--sysdeps/sh/nptl/pthread-offsets.h4
-rw-r--r--sysdeps/sparc/nptl/pthread-offsets.h8
-rw-r--r--sysdeps/x86_64/nptl/pthread-offsets.h4
17 files changed, 0 insertions, 84 deletions
diff --git a/sysdeps/aarch64/nptl/pthread-offsets.h b/sysdeps/aarch64/nptl/pthread-offsets.h
index 16c6b0d9fd..8208f6f177 100644
--- a/sysdeps/aarch64/nptl/pthread-offsets.h
+++ b/sysdeps/aarch64/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 12
#define __PTHREAD_MUTEX_KIND_OFFSET 16
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 24
diff --git a/sysdeps/alpha/nptl/pthread-offsets.h b/sysdeps/alpha/nptl/pthread-offsets.h
index 16c6b0d9fd..8208f6f177 100644
--- a/sysdeps/alpha/nptl/pthread-offsets.h
+++ b/sysdeps/alpha/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 12
#define __PTHREAD_MUTEX_KIND_OFFSET 16
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 24
diff --git a/sysdeps/arm/nptl/pthread-offsets.h b/sysdeps/arm/nptl/pthread-offsets.h
index 9617354dc7..e4e775d7ed 100644
--- a/sysdeps/arm/nptl/pthread-offsets.h
+++ b/sysdeps/arm/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 16
#define __PTHREAD_MUTEX_KIND_OFFSET 12
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 20
diff --git a/sysdeps/csky/nptl/pthread-offsets.h b/sysdeps/csky/nptl/pthread-offsets.h
index 9617354dc7..e4e775d7ed 100644
--- a/sysdeps/csky/nptl/pthread-offsets.h
+++ b/sysdeps/csky/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 16
#define __PTHREAD_MUTEX_KIND_OFFSET 12
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 20
diff --git a/sysdeps/hppa/nptl/pthread-offsets.h b/sysdeps/hppa/nptl/pthread-offsets.h
index 8ae01b9d95..e4e775d7ed 100644
--- a/sysdeps/hppa/nptl/pthread-offsets.h
+++ b/sysdeps/hppa/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 32
#define __PTHREAD_MUTEX_KIND_OFFSET 12
-#define __PTHREAD_MUTEX_SPINS_OFFSET 36
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 36
diff --git a/sysdeps/i386/nptl/pthread-offsets.h b/sysdeps/i386/nptl/pthread-offsets.h
index 9617354dc7..e4e775d7ed 100644
--- a/sysdeps/i386/nptl/pthread-offsets.h
+++ b/sysdeps/i386/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 16
#define __PTHREAD_MUTEX_KIND_OFFSET 12
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 20
diff --git a/sysdeps/ia64/nptl/pthread-offsets.h b/sysdeps/ia64/nptl/pthread-offsets.h
index 16c6b0d9fd..8208f6f177 100644
--- a/sysdeps/ia64/nptl/pthread-offsets.h
+++ b/sysdeps/ia64/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 12
#define __PTHREAD_MUTEX_KIND_OFFSET 16
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 24
diff --git a/sysdeps/m68k/nptl/pthread-offsets.h b/sysdeps/m68k/nptl/pthread-offsets.h
index 9617354dc7..e4e775d7ed 100644
--- a/sysdeps/m68k/nptl/pthread-offsets.h
+++ b/sysdeps/m68k/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 16
#define __PTHREAD_MUTEX_KIND_OFFSET 12
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 20
diff --git a/sysdeps/microblaze/nptl/pthread-offsets.h b/sysdeps/microblaze/nptl/pthread-offsets.h
index 9617354dc7..e4e775d7ed 100644
--- a/sysdeps/microblaze/nptl/pthread-offsets.h
+++ b/sysdeps/microblaze/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 16
#define __PTHREAD_MUTEX_KIND_OFFSET 12
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 20
diff --git a/sysdeps/mips/nptl/pthread-offsets.h b/sysdeps/mips/nptl/pthread-offsets.h
index 0ac3eda3fb..e96d34afd7 100644
--- a/sysdeps/mips/nptl/pthread-offsets.h
+++ b/sysdeps/mips/nptl/pthread-offsets.h
@@ -1,13 +1,5 @@
#if _MIPS_SIM == _ABI64
-# define __PTHREAD_MUTEX_NUSERS_OFFSET 12
# define __PTHREAD_MUTEX_KIND_OFFSET 16
-# define __PTHREAD_MUTEX_SPINS_OFFSET 20
-# define __PTHREAD_MUTEX_ELISION_OFFSET 22
-# define __PTHREAD_MUTEX_LIST_OFFSET 24
#else
-# define __PTHREAD_MUTEX_NUSERS_OFFSET 16
# define __PTHREAD_MUTEX_KIND_OFFSET 12
-# define __PTHREAD_MUTEX_SPINS_OFFSET 20
-# define __PTHREAD_MUTEX_ELISION_OFFSET 22
-# define __PTHREAD_MUTEX_LIST_OFFSET 20
#endif
diff --git a/sysdeps/nios2/nptl/pthread-offsets.h b/sysdeps/nios2/nptl/pthread-offsets.h
index 9617354dc7..e4e775d7ed 100644
--- a/sysdeps/nios2/nptl/pthread-offsets.h
+++ b/sysdeps/nios2/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 16
#define __PTHREAD_MUTEX_KIND_OFFSET 12
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 20
diff --git a/sysdeps/powerpc/nptl/pthread-offsets.h b/sysdeps/powerpc/nptl/pthread-offsets.h
index bdda1f197e..25b5bf2cbd 100644
--- a/sysdeps/powerpc/nptl/pthread-offsets.h
+++ b/sysdeps/powerpc/nptl/pthread-offsets.h
@@ -1,15 +1,7 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 64
-# define __PTHREAD_MUTEX_NUSERS_OFFSET 12
# define __PTHREAD_MUTEX_KIND_OFFSET 16
-# define __PTHREAD_MUTEX_SPINS_OFFSET 20
-# define __PTHREAD_MUTEX_ELISION_OFFSET 22
-# define __PTHREAD_MUTEX_LIST_OFFSET 24
#else
-# define __PTHREAD_MUTEX_NUSERS_OFFSET 16
# define __PTHREAD_MUTEX_KIND_OFFSET 12
-# define __PTHREAD_MUTEX_SPINS_OFFSET 20
-# define __PTHREAD_MUTEX_ELISION_OFFSET 22
-# define __PTHREAD_MUTEX_LIST_OFFSET 20
#endif
diff --git a/sysdeps/riscv/nptl/pthread-offsets.h b/sysdeps/riscv/nptl/pthread-offsets.h
index f1640047a0..6fc032fdc2 100644
--- a/sysdeps/riscv/nptl/pthread-offsets.h
+++ b/sysdeps/riscv/nptl/pthread-offsets.h
@@ -17,8 +17,4 @@
License along with the GNU C Library. If not, see
<https://www.gnu.org/licenses/>. */
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 12
#define __PTHREAD_MUTEX_KIND_OFFSET 16
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 24
diff --git a/sysdeps/s390/nptl/pthread-offsets.h b/sysdeps/s390/nptl/pthread-offsets.h
index bdda1f197e..25b5bf2cbd 100644
--- a/sysdeps/s390/nptl/pthread-offsets.h
+++ b/sysdeps/s390/nptl/pthread-offsets.h
@@ -1,15 +1,7 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 64
-# define __PTHREAD_MUTEX_NUSERS_OFFSET 12
# define __PTHREAD_MUTEX_KIND_OFFSET 16
-# define __PTHREAD_MUTEX_SPINS_OFFSET 20
-# define __PTHREAD_MUTEX_ELISION_OFFSET 22
-# define __PTHREAD_MUTEX_LIST_OFFSET 24
#else
-# define __PTHREAD_MUTEX_NUSERS_OFFSET 16
# define __PTHREAD_MUTEX_KIND_OFFSET 12
-# define __PTHREAD_MUTEX_SPINS_OFFSET 20
-# define __PTHREAD_MUTEX_ELISION_OFFSET 22
-# define __PTHREAD_MUTEX_LIST_OFFSET 20
#endif
diff --git a/sysdeps/sh/nptl/pthread-offsets.h b/sysdeps/sh/nptl/pthread-offsets.h
index 9617354dc7..e4e775d7ed 100644
--- a/sysdeps/sh/nptl/pthread-offsets.h
+++ b/sysdeps/sh/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 16
#define __PTHREAD_MUTEX_KIND_OFFSET 12
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 20
diff --git a/sysdeps/sparc/nptl/pthread-offsets.h b/sysdeps/sparc/nptl/pthread-offsets.h
index bdda1f197e..25b5bf2cbd 100644
--- a/sysdeps/sparc/nptl/pthread-offsets.h
+++ b/sysdeps/sparc/nptl/pthread-offsets.h
@@ -1,15 +1,7 @@
#include <bits/wordsize.h>
#if __WORDSIZE == 64
-# define __PTHREAD_MUTEX_NUSERS_OFFSET 12
# define __PTHREAD_MUTEX_KIND_OFFSET 16
-# define __PTHREAD_MUTEX_SPINS_OFFSET 20
-# define __PTHREAD_MUTEX_ELISION_OFFSET 22
-# define __PTHREAD_MUTEX_LIST_OFFSET 24
#else
-# define __PTHREAD_MUTEX_NUSERS_OFFSET 16
# define __PTHREAD_MUTEX_KIND_OFFSET 12
-# define __PTHREAD_MUTEX_SPINS_OFFSET 20
-# define __PTHREAD_MUTEX_ELISION_OFFSET 22
-# define __PTHREAD_MUTEX_LIST_OFFSET 20
#endif
diff --git a/sysdeps/x86_64/nptl/pthread-offsets.h b/sysdeps/x86_64/nptl/pthread-offsets.h
index 16c6b0d9fd..8208f6f177 100644
--- a/sysdeps/x86_64/nptl/pthread-offsets.h
+++ b/sysdeps/x86_64/nptl/pthread-offsets.h
@@ -1,5 +1 @@
-#define __PTHREAD_MUTEX_NUSERS_OFFSET 12
#define __PTHREAD_MUTEX_KIND_OFFSET 16
-#define __PTHREAD_MUTEX_SPINS_OFFSET 20
-#define __PTHREAD_MUTEX_ELISION_OFFSET 22
-#define __PTHREAD_MUTEX_LIST_OFFSET 24