mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
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>
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user