mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-26 04:31:03 +00:00
ca6e601a9d
This uses atomic operations to access lock elision metadata that is accessed concurrently (ie, adapt_count fields). The size of the data is less than a word but accessed only with atomic loads and stores; therefore, we add support for shorter-size atomic load and stores too. * include/atomic.h (__atomic_check_size_ls): New. (atomic_load_relaxed, atomic_load_acquire, atomic_store_relaxed, atomic_store_release): Use it. * sysdeps/x86/elide.h (ACCESS_ONCE): Remove. (elision_adapt, ELIDE_LOCK): Use atomics. * sysdeps/unix/sysv/linux/x86/elision-lock.c (__lll_lock_elision): Use atomics and improve code comments. * sysdeps/unix/sysv/linux/x86/elision-trylock.c (__lll_trylock_elision): Likewise. |
||
---|---|---|
.. | ||
bits | ||
sys | ||
elision-conf.c | ||
elision-conf.h | ||
elision-lock.c | ||
elision-timed.c | ||
elision-trylock.c | ||
elision-unlock.c | ||
force-elision.h | ||
gettimeofday.c | ||
hle.h | ||
libc-vdso.h | ||
Makefile | ||
pthread_mutex_cond_lock.c | ||
pthread_mutex_lock.c | ||
pthread_mutex_timedlock.c | ||
pthread_mutex_trylock.c | ||
sysconf.c | ||
time.c |