about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorPaul Murphy <murphyp@linux.vnet.ibm.com>2015-09-03 13:40:11 -0500
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2015-10-15 18:55:48 -0300
commite5e6bea22a2939fe7c415a375992f3ca19f9ff2e (patch)
tree020b80fd6849e58a1ad7fec2c305fa75be4d3fbf /nptl
parent3c82bb5042330441a18fd8e8d5b74d25d5540a66 (diff)
downloadglibc-e5e6bea22a2939fe7c415a375992f3ca19f9ff2e.tar.gz
glibc-e5e6bea22a2939fe7c415a375992f3ca19f9ff2e.tar.xz
glibc-e5e6bea22a2939fe7c415a375992f3ca19f9ff2e.zip
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
Diffstat (limited to 'nptl')
-rw-r--r--nptl/pthread_mutex_unlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nptl/pthread_mutex_unlock.c b/nptl/pthread_mutex_unlock.c
index 80939ba8b0..9e864c1832 100644
--- a/nptl/pthread_mutex_unlock.c
+++ b/nptl/pthread_mutex_unlock.c
@@ -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)