]> git.ipfire.org Git - thirdparty/glibc.git/commit - nptl/pthread_mutex_unlock.c
nptl: pthread_mutex_lock, pthread_mutex_unock single-threaded optimization
authorFlorian Weimer <fweimer@redhat.com>
Wed, 21 Apr 2021 17:49:51 +0000 (19:49 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 21 Apr 2021 17:49:51 +0000 (19:49 +0200)
commit99f841c441feeaa9a3d97fd91bb3d6ec8073c982
tree679184226a8c4d55e7981f03a758361122267cc9
parenteda0c098ed31489ce21f15d775ed96c1f6b395ad
nptl: pthread_mutex_lock, pthread_mutex_unock single-threaded optimization

This is optimization is similar in spirit to the SINGLE_THREAD_P check
in the malloc implementation.  Doing this in generic code allows us
to prioritize those cases which are likely to occur in single-threaded
programs (normal and recursive mutexes).

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
nptl/pthread_mutex_cond_lock.c
nptl/pthread_mutex_lock.c
nptl/pthread_mutex_unlock.c