glibc/sysdeps/csky
Adhemerval Zanella 1c3f9acf1f nptl: Add struct_mutex.h
The current way of defining the common mutex definition for POSIX and
C11 on pthreadtypes-arch.h (added by commit 06be6368da) is
not really the best options for newer ports.  It requires define some
misleading flags that should be always defined as 0
(__PTHREAD_COMPAT_PADDING_MID and __PTHREAD_COMPAT_PADDING_END), it
exposes options used solely for linuxthreads compat mode
(__PTHREAD_MUTEX_USE_UNION and __PTHREAD_MUTEX_NUSERS_AFTER_KIND), and
requires newer ports to explicit define them (adding more boilerplate
code).

This patch adds a new default __pthread_mutex_s definition meant to
be used by newer ports.  Its layout mimics the current usage on both
32 and 64 bits ports and it allows most ports to use the generic
definition.  Only ports that use some arch-specific definition (such
as hardware lock-elision or linuxthreads compat) requires specific
headers.

For 32 bit, the generic definitions mimic the other 32-bit ports
of using an union to define the fields uses on adaptive and robust
mutexes (thus not allowing both usage at same time) and by using a
single linked-list for robust mutexes.  Both decisions seemed to
follow what recent ports have done and make the resulting
pthread_mutex_t/mtx_t object smaller.

Also the static intialization macro for pthread_mutex_t is set to use
a macro __PTHREAD_MUTEX_INITIALIZER where the architecture can redefine
in its struct_mutex.h if it requires additional fields to be
initialized.

Checked with a build on affected abis.

Change-Id: I30a22c3e3497805fd6e52994c5925897cffcfe13
2019-11-26 13:53:36 +00:00
..
abiv2 Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
bits Split up endian.h to minimize exposure of BYTE_ORDER. 2019-10-01 14:54:46 -07:00
fpu Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
nofpu Add C-SKY port 2018-12-21 09:48:04 +08:00
nptl nptl: Add struct_mutex.h 2019-11-26 13:53:36 +00:00
abort-instr.h Add C-SKY port 2018-12-21 09:48:04 +08:00
atomic-machine.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
bsd-_setjmp.S Add C-SKY port 2018-12-21 09:48:04 +08:00
bsd-setjmp.S Add C-SKY port 2018-12-21 09:48:04 +08:00
configure Add C-SKY port 2018-12-21 09:48:04 +08:00
configure.ac Add C-SKY port 2018-12-21 09:48:04 +08:00
dl-machine.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-procinfo.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-procinfo.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-sysdep.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-tls.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
fpu_control.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
gccframe.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
Implies Add C-SKY port 2018-12-21 09:48:04 +08:00
jmpbuf-unwind.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ldsodefs.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
libc-tls.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
linkmap.h Add C-SKY port 2018-12-21 09:48:04 +08:00
machine-gmon.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
Makefile Add C-SKY port 2018-12-21 09:48:04 +08:00
memusage.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
preconfigure Add C-SKY port 2018-12-21 09:48:04 +08:00
sfp-machine.h Add C-SKY port 2018-12-21 09:48:04 +08:00
sotruss-lib.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
stackinfo.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
sysdep.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tininess.h Add C-SKY port 2018-12-21 09:48:04 +08:00
tst-audit.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00