glibc/sysdeps
Adhemerval Zanella dff91cd45e nptl: Add tests for internal pthread_mutex_t offsets
This patch adds a new build test to check for internal fields
offsets for user visible internal field.  Although currently
the only field which is statically initialized to a non zero value
is pthread_mutex_t.__data.__kind value, the tests also check the
offset of __kind, __spins, __elision (if supported), and __list
internal member.  A internal header (pthread-offset.h) is added
to each major ABI with the reference value.

Checked on x86_64-linux-gnu and with a build check for all affected
ABIs (aarch64-linux-gnu, alpha-linux-gnu, arm-linux-gnueabihf,
hppa-linux-gnu, i686-linux-gnu, ia64-linux-gnu, m68k-linux-gnu,
microblaze-linux-gnu, mips64-linux-gnu, mips64-n32-linux-gnu,
mips-linux-gnu, powerpc64le-linux-gnu, powerpc-linux-gnu,
s390-linux-gnu, s390x-linux-gnu, sh4-linux-gnu, sparc64-linux-gnu,
sparcv9-linux-gnu, tilegx-linux-gnu, tilegx-linux-gnu-x32,
tilepro-linux-gnu, x86_64-linux-gnu, and x86_64-linux-x32).

	* nptl/pthreadP.h (ASSERT_PTHREAD_STRING,
	ASSERT_PTHREAD_INTERNAL_OFFSET): New macro.
	* nptl/pthread_mutex_init.c (__pthread_mutex_init): Add build time
	checks for internal pthread_mutex_t offsets.
	* sysdeps/aarch64/nptl/pthread-offsets.h
	(__PTHREAD_MUTEX_NUSERS_OFFSET, __PTHREAD_MUTEX_KIND_OFFSET,
	__PTHREAD_MUTEX_SPINS_OFFSET, __PTHREAD_MUTEX_ELISION_OFFSET,
	__PTHREAD_MUTEX_LIST_OFFSET): New macro.
	* sysdeps/alpha/nptl/pthread-offsets.h: Likewise.
	* sysdeps/arm/nptl/pthread-offsets.h: Likewise.
	* sysdeps/hppa/nptl/pthread-offsets.h: Likewise.
	* sysdeps/i386/nptl/pthread-offsets.h: Likewise.
	* sysdeps/ia64/nptl/pthread-offsets.h: Likewise.
	* sysdeps/m68k/nptl/pthread-offsets.h: Likewise.
	* sysdeps/microblaze/nptl/pthread-offsets.h: Likewise.
	* sysdeps/mips/nptl/pthread-offsets.h: Likewise.
	* sysdeps/nios2/nptl/pthread-offsets.h: Likewise.
	* sysdeps/powerpc/nptl/pthread-offsets.h: Likewise.
	* sysdeps/s390/nptl/pthread-offsets.h: Likewise.
	* sysdeps/sh/nptl/pthread-offsets.h: Likewise.
	* sysdeps/sparc/nptl/pthread-offsets.h: Likewise.
	* sysdeps/tile/nptl/pthread-offsets.h: Likewise.
	* sysdeps/x86_64/nptl/pthread-offsets.h: Likewise.

Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2017-11-07 09:48:28 -02:00
..
aarch64 nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
alpha nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
arm nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
generic Add _Float128 function aliases. 2017-10-18 17:37:18 +00:00
gnu hurd: Fix getifaddrs' and freeifaddrs' symbol exposition 2017-09-28 01:05:18 +02:00
hppa nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
i386 nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
ia64 nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
ieee754 Add bits/floatn.h defines for more _FloatN / _FloatNx types. 2017-10-20 21:42:51 +00:00
init_array Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
m68k nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
mach Introduce NO_RTLD_HIDDEN, make hurd use it instead of NO_HIDDEN 2017-10-03 01:33:38 +02:00
microblaze nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
mips nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
nios2 nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
nptl Remove add-ons mechanism. 2017-10-05 15:58:13 +00:00
posix sysconf: Fix missing definition of UIO_MAXIOV on Linux [BZ #22321] 2017-10-20 04:10:15 +02:00
powerpc nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
pthread aio: Remove internal_function function attribute 2017-08-31 15:59:06 +02:00
s390 nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
sh nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
sparc nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
tile nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00
unix Move <bits/mman-linux.h> to the Linux sysdeps directory 2017-11-07 12:11:42 +01:00
wordsize-32 Build divdi3 only for architecture that required it 2017-04-06 15:14:34 -03:00
wordsize-64 posix: Consolidate Linux glob implementation 2017-09-08 16:34:02 +02:00
x86 x86: Add sysdeps/x86/sysdep.h 2017-11-01 05:37:26 -07:00
x86_64 nptl: Add tests for internal pthread_mutex_t offsets 2017-11-07 09:48:28 -02:00