nptl: Add struct_rwlock.h
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 9 Nov 2017 21:41:02 +0000 (19:41 -0200)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 26 Nov 2019 13:53:36 +0000 (13:53 +0000)
commit7df8af43ad1cd8ce527444de50bee6f35eebe071
treeebc286926fa33ca713f4cc4ad386aef0d094ae62
parent1c3f9acf1f1f75faa7a28bf39af64afda93839ac
nptl: Add struct_rwlock.h

This patch adds a new generic __pthread_rwlock_arch_t definition meant
to be used by new ports.  Its layout mimics the current usage on some
64 bits ports and it allows some ports to use the generic definition.
The arch __pthread_rwlock_arch_t definition is moved from
pthreadtypes-arch.h to another arch-specific header (struct_rwlock.h).

Also the static intialization macro for pthread_rwlock_t is set to use
an arch defined on (__PTHREAD_RWLOCK_INITIALIZER) which simplifies its
implementation.

The default pthread_rwlock_t layout differs from current ports with:

  1. Internal layout is the same for 32 bits and 64 bits.

  2. Internal flag is an unsigned short so it should not required
     additional padding to align for word boundary (if it is the case
     for the ABI).

Checked with a build on affected abis.

Change-Id: I776a6a986c23199929d28a3dcd30272db21cd1d0
31 files changed:
nptl/Makefile
sysdeps/aarch64/nptl/bits/pthreadtypes-arch.h
sysdeps/aarch64/nptl/bits/struct_rwlock.h [new file with mode: 0644]
sysdeps/alpha/nptl/bits/pthreadtypes-arch.h
sysdeps/alpha/nptl/bits/struct_rwlock.h [new file with mode: 0644]
sysdeps/arm/nptl/bits/pthreadtypes-arch.h
sysdeps/csky/nptl/bits/pthreadtypes-arch.h
sysdeps/hppa/nptl/bits/pthreadtypes-arch.h
sysdeps/hppa/nptl/bits/struct_rwlock.h [new file with mode: 0644]
sysdeps/ia64/nptl/bits/pthreadtypes-arch.h
sysdeps/ia64/nptl/bits/struct_rwlock.h [new file with mode: 0644]
sysdeps/m68k/nptl/bits/pthreadtypes-arch.h
sysdeps/microblaze/nptl/bits/pthreadtypes-arch.h
sysdeps/mips/nptl/bits/pthreadtypes-arch.h
sysdeps/mips/nptl/bits/struct_rwlock.h [new file with mode: 0644]
sysdeps/nios2/nptl/bits/pthreadtypes-arch.h
sysdeps/nptl/bits/struct_rwlock.h [new file with mode: 0644]
sysdeps/nptl/bits/thread-shared-types.h
sysdeps/nptl/pthread.h
sysdeps/powerpc/nptl/bits/pthreadtypes-arch.h
sysdeps/powerpc/nptl/bits/struct_rwlock.h [new file with mode: 0644]
sysdeps/riscv/nptl/bits/pthreadtypes-arch.h
sysdeps/riscv/nptl/bits/struct_rwlock.h [new file with mode: 0644]
sysdeps/s390/nptl/bits/pthreadtypes-arch.h
sysdeps/s390/nptl/bits/struct_rwlock.h [new file with mode: 0644]
sysdeps/sh/nptl/bits/pthreadtypes-arch.h
sysdeps/sparc/nptl/bits/pthreadtypes-arch.h
sysdeps/sparc/nptl/bits/struct_rwlock.h [new file with mode: 0644]
sysdeps/unix/sysv/linux/hppa/pthread.h
sysdeps/x86/nptl/bits/pthreadtypes-arch.h
sysdeps/x86/nptl/bits/struct_rwlock.h [new file with mode: 0644]