glibc/sysdeps/alpha
Adhemerval Zanella 06be6368da nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION}
This patch adds two new internal defines to set the internal
pthread_mutex_t layout required by the supported ABIS:

  1. __PTHREAD_MUTEX_NUSERS_AFTER_KIND which control whether to define
     __nusers fields before or after __kind.  The preferred value for
     is 0 for new ports and it sets __nusers before __kind.

  2. __PTHREAD_MUTEX_USE_UNION which control whether internal __spins and
     __list members will be place inside an union for linuxthreads
     compatibility.  The preferred value is 0 for ports and it sets
     to not use an union to define both fields.

It fixes the wrong offsets value for __kind value on x86_64-linux-gnu-x32.
Checked with a make check run-built-tests=no on all afected ABIs.

	[BZ #22298]
	* nptl/allocatestack.c (allocate_stack): Check if
	__PTHREAD_MUTEX_HAVE_PREV is non-zero, instead if
	__PTHREAD_MUTEX_HAVE_PREV is defined.
	* nptl/descr.h (pthread): Likewise.
	* nptl/nptl-init.c (__pthread_initialize_minimal_internal):
	Likewise.
	* nptl/pthread_create.c (START_THREAD_DEFN): Likewise.
	* sysdeps/nptl/fork.c (__libc_fork): Likewise.
	* sysdeps/nptl/pthread.h (PTHREAD_MUTEX_INITIALIZER): Likewise.
	* sysdeps/nptl/bits/thread-shared-types.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): New
	defines.
	(__pthread_internal_list): Check __PTHREAD_MUTEX_USE_UNION instead
	of __WORDSIZE for internal layout.
	(__pthread_mutex_s): Check __PTHREAD_MUTEX_NUSERS_AFTER_KIND instead
	of __WORDSIZE for internal __nusers layout and __PTHREAD_MUTEX_USE_UNION
	instead of __WORDSIZE whether to use an union for __spins and __list
	fields.
	(__PTHREAD_MUTEX_HAVE_PREV): Define also for __PTHREAD_MUTEX_USE_UNION
	case.
	* sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION): New
	defines.
	* sysdeps/alpha/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/arm/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/hppa/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/ia64/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/m68k/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/microblaze/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/mips/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/nios2/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/powerpc/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/s390/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/sh/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/sparc/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/tile/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.
	* sysdeps/x86/nptl/bits/pthreadtypes-arch.h
	(__PTHREAD_MUTEX_NUSERS_AFTER_KIND, __PTHREAD_MUTEX_USE_UNION):
	Likewise.

Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2017-11-07 09:48:41 -02:00
..
alphaev5 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
alphaev6 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
alphaev67 Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bits Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fpu Use libm_alias_double for dbl-64 fma. 2017-10-04 20:32:48 +00:00
nptl nptl: Define __PTHREAD_MUTEX_{NUSERS_AFTER_KIND,USE_UNION} 2017-11-07 09:48:41 -02:00
soft-fp Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
_mcount.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
add_n.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
atomic-machine.h Optimize generic spinlock code and use C11 like atomic macros. 2017-06-06 09:41:56 +02:00
backtrace.c Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
bsd-_setjmp.S Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
bsd-setjmp.S Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
bzero.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
configure Require autoconf 2.69 2014-09-29 07:53:36 -07:00
configure.ac Require autoconf 2.69 2014-09-29 07:53:36 -07:00
crti.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
div_libc.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
div.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
divl.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
divlu.S Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
divq.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
divqu.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-dtprocnum.h Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
dl-machine.h PowerPC64 ELFv2 PPC64_OPT_LOCALENTRY 2017-06-14 10:47:25 +09:30
dl-procinfo.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-procinfo.h Remove _dl_platform_string 2017-03-14 17:18:52 +01:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-tls.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ffs.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ffsll.S Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hp-timing.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
htonl.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
htons.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Implies Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
jmpbuf-offsets.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ldiv.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
libc-tls.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lldiv.S Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
lshift.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memchr.c alpha: Use saturating arithmetic in memchr 2017-02-01 14:39:04 -08:00
memset.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mul_1.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
nscd-types.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
preconfigure Remove relro configure test. 2014-06-27 16:51:22 +00:00
rawmemchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
reml.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
remlu.S Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
remq.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
remqu.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
rshift.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stpcpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stpncpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcat.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strcpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strncat.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strncmp.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strncpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
strrchr.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stxcpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stxncpy.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Subdirs Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
submul_1.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tininess.h Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
tls-macros.h Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
udiv_qrnnd.S Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Versions Relocate alpha from ports to libc 2014-02-12 07:00:06 -08:00