diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-10-15 07:48:58 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-10-15 07:48:58 -0700 |
commit | 16be5568a0c24b9bd1ade7fa937c94b5d53b6ab1 (patch) | |
tree | 4531c244fc07bc63f33aeb9c48ce4d0a8f34f5a8 /misc/preadv64v2.c | |
parent | df44f9d02b68de45ba8c3984f47ecf1a523306ec (diff) | |
download | glibc-hjl/pr22298/master.tar.gz |
Define __PTHREAD_MUTEX_HAVE_PREV only if undefined [BZ #22298]hjl/pr22298/master
It is incorrect to define __PTHREAD_MUTEX_HAVE_PREV to 1 only when
__WORDSIZE == 64. For x32, __PTHREAD_MUTEX_HAVE_PREV should be 1, but
it has __WORDSIZE == 32. This patch defines __PTHREAD_MUTEX_HAVE_PREV
based on __WORDSIZE only if it is undefined. __PTHREAD_MUTEX_HAVE_PREV
check is changed from "#ifdef" to "#if" to support values of 0 or 1.
[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_HAVE_PREV): Define only if it is undefined.
(__pthread_internal_list): Check __pthread_internal_list instead
of __WORDSIZE.
(__PTHREAD_SPINS_DATA): Likewise.
(__PTHREAD_SPINS): Likewise.
(__pthread_mutex_s): Likewise.
* sysdeps/x86/nptl/bits/pthreadtypes-arch.h
(__PTHREAD_MUTEX_HAVE_PREV): Defined.
Diffstat (limited to 'misc/preadv64v2.c')
0 files changed, 0 insertions, 0 deletions