diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-10-30 13:29:40 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2019-10-31 11:09:10 -0300 |
commit | 6b1472eb2ea16f99c4729f975ca25af980ce3894 (patch) | |
tree | 14cd1db1ac52188e91e81ab3ef3a93735d1683be /nptl/pthread_mutex_unlock.c | |
parent | fbb4a3143724ef3f044a4f05351fe041300ee382 (diff) | |
download | glibc-6b1472eb2ea16f99c4729f975ca25af980ce3894.zip glibc-6b1472eb2ea16f99c4729f975ca25af980ce3894.tar.gz glibc-6b1472eb2ea16f99c4729f975ca25af980ce3894.tar.bz2 |
Refactor PI mutexes internal definitions
This patch adds the generic futex_lock_pi and futex_unlock_pi to wrap
around the syscall machinery required to issue the syscall calls. It
simplifies a bit the futex code required to implement PI mutexes.
No function changes, checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'nptl/pthread_mutex_unlock.c')
-rw-r--r-- | nptl/pthread_mutex_unlock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c index 71038f9..53f8b86 100644 --- a/nptl/pthread_mutex_unlock.c +++ b/nptl/pthread_mutex_unlock.c @@ -22,6 +22,7 @@ #include "pthreadP.h" #include <lowlevellock.h> #include <stap-probe.h> +#include <futex-internal.h> #ifndef lll_unlock_elision #define lll_unlock_elision(a,b,c) ({ lll_unlock (a,c); 0; }) @@ -277,9 +278,8 @@ __pthread_mutex_unlock_full (pthread_mutex_t *mutex, int decr) if (((l & FUTEX_WAITERS) != 0) || (l != THREAD_GETMEM (THREAD_SELF, tid))) { - INTERNAL_SYSCALL_DECL (__err); - INTERNAL_SYSCALL (futex, __err, 2, &mutex->__data.__lock, - __lll_private_flag (FUTEX_UNLOCK_PI, private)); + futex_unlock_pi ((unsigned int *) &mutex->__data.__lock, + private); break; } } |