nptl: Move elision implementations into libc
authorFlorian Weimer <fweimer@redhat.com>
Tue, 23 Feb 2021 13:59:34 +0000 (14:59 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Tue, 23 Feb 2021 13:59:34 +0000 (14:59 +0100)
commit5a664d7ae8e42d641a7b4b436987ff67ab483b08
treed2530831e3613ab86b5f536341304ac8cc98f452
parent597d0267b5c4a925f0175837ec09df9f77e0a250
nptl: Move elision implementations into libc

The elision interfaces are closely aligned between the targets that
implement them, so declare them in the generic <lowlevellock.h>
file.

Empty .c stubs are provided, so that fewer makefile updates
under sysdeps are needed.  Also simplify initialization via
__libc_early_init.

The symbols __lll_clocklock_elision, __lll_lock_elision,
__lll_trylock_elision, __lll_unlock_elision, __pthread_force_elision
move into libc.  For the time being, non-hidden references are used
from libpthread to access them, but once that part of libpthread
is moved into libc, hidden symbols will be used again.  (Hidden
references seem desirable to reduce the likelihood of transactions
aborts.)
46 files changed:
elf/libc_early_init.c
nptl/Makefile
nptl/Versions
nptl/elision-conf.c [moved from sysdeps/unix/sysv/linux/s390/pthread_mutex_lock.c with 79% similarity]
nptl/elision-lock.c [moved from sysdeps/unix/sysv/linux/powerpc/pthread_mutex_lock.c with 79% similarity]
nptl/elision-timed.c [moved from sysdeps/unix/sysv/linux/powerpc/pthread_mutex_trylock.c with 78% similarity]
nptl/elision-trylock.c [moved from sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c with 79% similarity]
nptl/elision-unlock.c [new file with mode: 0644]
nptl/lowlevellock.c
nptl/pthread_mutex_lock.c
nptl/pthread_mutex_timedlock.c
nptl/pthread_mutex_trylock.c
nptl/pthread_mutex_unlock.c
sysdeps/nptl/lowlevellock.h
sysdeps/pthread/elision-conf.h [moved from sysdeps/unix/sysv/linux/powerpc/pthread_mutex_timedlock.c with 63% similarity]
sysdeps/unix/sysv/linux/powerpc/Makefile
sysdeps/unix/sysv/linux/powerpc/elision-conf.c
sysdeps/unix/sysv/linux/powerpc/elision-conf.h
sysdeps/unix/sysv/linux/powerpc/elision-lock.c
sysdeps/unix/sysv/linux/powerpc/elision-trylock.c
sysdeps/unix/sysv/linux/powerpc/elision-unlock.c
sysdeps/unix/sysv/linux/powerpc/force-elision.h [deleted file]
sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [deleted file]
sysdeps/unix/sysv/linux/powerpc/pthread_mutex_cond_lock.c [deleted file]
sysdeps/unix/sysv/linux/s390/Makefile
sysdeps/unix/sysv/linux/s390/elision-conf.c
sysdeps/unix/sysv/linux/s390/elision-conf.h
sysdeps/unix/sysv/linux/s390/elision-lock.c
sysdeps/unix/sysv/linux/s390/elision-trylock.c
sysdeps/unix/sysv/linux/s390/elision-unlock.c
sysdeps/unix/sysv/linux/s390/force-elision.h [deleted file]
sysdeps/unix/sysv/linux/s390/lowlevellock.h [deleted file]
sysdeps/unix/sysv/linux/s390/pthread_mutex_cond_lock.c [deleted file]
sysdeps/unix/sysv/linux/s390/pthread_mutex_timedlock.c [deleted file]
sysdeps/unix/sysv/linux/s390/pthread_mutex_trylock.c [deleted file]
sysdeps/unix/sysv/linux/x86/Makefile
sysdeps/unix/sysv/linux/x86/elision-conf.c
sysdeps/unix/sysv/linux/x86/elision-conf.h
sysdeps/unix/sysv/linux/x86/elision-lock.c
sysdeps/unix/sysv/linux/x86/elision-trylock.c
sysdeps/unix/sysv/linux/x86/elision-unlock.c
sysdeps/unix/sysv/linux/x86/force-elision.h [deleted file]
sysdeps/unix/sysv/linux/x86/lowlevellock.h
sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c [deleted file]
sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c [deleted file]
sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c [deleted file]