mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-19 01:11:05 +00:00
nptl: Add adapt_count parameter to lll_unlock_elision
Adding this parameter will give architectures more freedom in how they choose to update this variable. This change has no effect on architectures which choose not to use it. * nptl/pthread_mutex_unlock.c(lll_unlock_elision): Add elision adapt_count parameter to list of arguments. * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_unlock_elision): Update with new parameter list * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_unlock_elision): Likewise * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock_elision): Likewise
This commit is contained in:
parent
3c82bb5042
commit
e5e6bea22a
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
2015-10-15 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
|
||||
|
||||
* nptl/pthread_mutex_unlock.c (lll_unlock_elision):
|
||||
Add elision adapt_count parameter to list of arguments.
|
||||
* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
|
||||
(lll_unlock_elision): Update with new parameter list
|
||||
* sysdeps/unix/sysv/linux/s390/lowlevellock.h
|
||||
(lll_unlock_elision): Likewise
|
||||
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
|
||||
(lll_unlock_elision): Likewise
|
||||
|
||||
2015-10-15 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #19122]
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <stap-probe.h>
|
||||
|
||||
#ifndef lll_unlock_elision
|
||||
#define lll_unlock_elision(a,b) ({ lll_unlock (a,b); 0; })
|
||||
#define lll_unlock_elision(a,b,c) ({ lll_unlock (a,c); 0; })
|
||||
#endif
|
||||
|
||||
static int
|
||||
@ -63,7 +63,7 @@ __pthread_mutex_unlock_usercnt (mutex, decr)
|
||||
else if (__glibc_likely (type == PTHREAD_MUTEX_TIMED_ELISION_NP))
|
||||
{
|
||||
/* Don't reset the owner/users fields for elision. */
|
||||
return lll_unlock_elision (mutex->__data.__lock,
|
||||
return lll_unlock_elision (mutex->__data.__lock, mutex->__data.__elision,
|
||||
PTHREAD_MUTEX_PSHARED (mutex));
|
||||
}
|
||||
else if (__builtin_expect (PTHREAD_MUTEX_TYPE (mutex)
|
||||
|
@ -40,7 +40,7 @@ extern int __lll_trylock_elision(int *lock, short *adapt_count)
|
||||
|
||||
#define lll_lock_elision(futex, adapt_count, private) \
|
||||
__lll_lock_elision (&(futex), &(adapt_count), private)
|
||||
#define lll_unlock_elision(futex, private) \
|
||||
#define lll_unlock_elision(futex, adapt_count, private) \
|
||||
__lll_unlock_elision (&(futex), private)
|
||||
#define lll_trylock_elision(futex, adapt_count) \
|
||||
__lll_trylock_elision (&(futex), &(adapt_count))
|
||||
|
@ -41,7 +41,7 @@ extern int __lll_trylock_elision(int *futex, short *adapt_count)
|
||||
|
||||
# define lll_lock_elision(futex, adapt_count, private) \
|
||||
__lll_lock_elision (&(futex), &(adapt_count), private)
|
||||
# define lll_unlock_elision(futex, private) \
|
||||
# define lll_unlock_elision(futex, adapt_count, private) \
|
||||
__lll_unlock_elision (&(futex), private)
|
||||
# define lll_trylock_elision(futex, adapt_count) \
|
||||
__lll_trylock_elision(&(futex), &(adapt_count))
|
||||
|
@ -342,7 +342,7 @@ extern int __lll_trylock_elision (int *lock, short *adapt_count)
|
||||
|
||||
#define lll_lock_elision(futex, adapt_count, private) \
|
||||
__lll_lock_elision (&(futex), &(adapt_count), private)
|
||||
#define lll_unlock_elision(futex, private) \
|
||||
#define lll_unlock_elision(futex, adapt_count, private) \
|
||||
__lll_unlock_elision (&(futex), private)
|
||||
#define lll_trylock_elision(futex, adapt_count) \
|
||||
__lll_trylock_elision (&(futex), &(adapt_count))
|
||||
|
Loading…
Reference in New Issue
Block a user