diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-06-25 10:11:00 +0200 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-10-01 08:09:13 -0300 |
commit | 8352b6df371f1d08f86b4600a7725a5181e021ee (patch) | |
tree | 39a3bed73cdf1ec4908fccb4401a83295b74b81c /nptl/pthread_mutex_lock.c | |
parent | dd5adb515c105e4ad1619825babe85d75a7a755c (diff) | |
download | glibc-8352b6df371f1d08f86b4600a7725a5181e021ee.tar.gz glibc-8352b6df371f1d08f86b4600a7725a5181e021ee.tar.xz glibc-8352b6df371f1d08f86b4600a7725a5181e021ee.zip |
nptl: Use FUTEX_LOCK_PI2 when available
This patch uses the new futex PI operation provided by Linux v5.14 when it is required. The futex_lock_pi64() is moved to futex-internal.c (since it used on two different places and its code size might be large depending of the kernel configuration) and clockid is added as an argument. Co-authored-by: Kurt Kanzenbach <kurt@linutronix.de>
Diffstat (limited to 'nptl/pthread_mutex_lock.c')
-rw-r--r-- | nptl/pthread_mutex_lock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c index fbe8a3cd21..2bd41767e0 100644 --- a/nptl/pthread_mutex_lock.c +++ b/nptl/pthread_mutex_lock.c @@ -421,7 +421,8 @@ __pthread_mutex_lock_full (pthread_mutex_t *mutex) int private = (robust ? PTHREAD_ROBUST_MUTEX_PSHARED (mutex) : PTHREAD_MUTEX_PSHARED (mutex)); - int e = futex_lock_pi64 (&mutex->__data.__lock, NULL, private); + int e = __futex_lock_pi64 (&mutex->__data.__lock, 0 /* ununsed */, + NULL, private); if (e == ESRCH || e == EDEADLK) { assert (e != EDEADLK |