This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.19-578-gb7aa8ca


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  b7aa8caacee9ec707835ee48d14ab46bfdbae4e9 (commit)
       via  8491ed6d70b60e4c75cdcfde10ae759898547b08 (commit)
       via  a832bdd36203fcb37fa5ad25200ef3c1ae205efe (commit)
      from  995a46bbfba9964e328e3947130919d8bd3cd62a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b7aa8caacee9ec707835ee48d14ab46bfdbae4e9

commit b7aa8caacee9ec707835ee48d14ab46bfdbae4e9
Author: Andi Kleen <ak@linux.intel.com>
Date:   Mon Mar 3 07:06:11 2014 -0800

    Remove x86 assembler rwlock code
    
    With the recent tuning the C version of rwlocks is basically the same
    performance as the x86 assembler version for uncontended locks (with a
    a few cycles near the run-to-run variability). For others it should not
    matter anyways.
    
    So remove the assembler code and use the C version like other
    architectures.

diff --git a/ChangeLog b/ChangeLog
index 6e3d2a9..5960dff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,28 @@
 2014-06-13  Andi Kleen  <ak@linux.intel.com>
 
+        * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Remove.
+        * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: dito.
+        * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: dito.
+        * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: dito.
+        * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: dito.
+        * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: dito.
+        * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: dito.
+        * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: dito.
+
+2014-06-13  Andi Kleen  <ak@linux.intel.com>
+
 	* nptl/pthread_rwlock_rdlock.c: Include elide.h.
         (pthread_rwlock_rdlock): Add elision.
         * nptl/pthread_rwlock_wrlock.c: Include elide.h.
diff --git a/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S b/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
deleted file mode 100644
index a81bc06..0000000
--- a/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
+++ /dev/null
@@ -1,192 +0,0 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <lowlevellock.h>
-#include <lowlevelrwlock.h>
-#include <pthread-errnos.h>
-#include <kernel-features.h>
-
-#include <stap-probe.h>
-
-	.text
-
-	.globl	__pthread_rwlock_rdlock
-	.type	__pthread_rwlock_rdlock,@function
-	.align	16
-__pthread_rwlock_rdlock:
-	cfi_startproc
-	pushl	%esi
-	cfi_adjust_cfa_offset(4)
-	pushl	%ebx
-	cfi_adjust_cfa_offset(4)
-	cfi_offset(%esi, -8)
-	cfi_offset(%ebx, -12)
-
-	xorl	%esi, %esi
-	movl	12(%esp), %ebx
-
-	LIBC_PROBE (rdlock_entry, 1, %ebx)
-
-	/* Get the lock.  */
-	movl	$1, %edx
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %edx, (%ebx)
-#else
-	cmpxchgl %edx, MUTEX(%ebx)
-#endif
-	jnz	1f
-
-2:	movl	WRITER(%ebx), %eax
-	testl	%eax, %eax
-	jne	14f
-	cmpl	$0, WRITERS_QUEUED(%ebx)
-	je	5f
-	cmpb	$0, FLAGS(%ebx)
-	je	5f
-
-3:	addl	$1, READERS_QUEUED(%ebx)
-	je	4f
-
-	movl	READERS_WAKEUP(%ebx), %edx
-
-	LOCK
-#if MUTEX == 0
-	subl	$1, (%ebx)
-#else
-	subl	$1, MUTEX(%ebx)
-#endif
-	jne	10f
-
-11:
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movzbl	PSHARED(%ebx), %ecx
-	xorl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-#else
-	movzbl	PSHARED(%ebx), %ecx
-# if FUTEX_WAIT != 0
-	orl	$FUTEX_WAIT, %ecx
-# endif
-	xorl	%gs:PRIVATE_FUTEX, %ecx
-#endif
-	addl	$READERS_WAKEUP, %ebx
-	movl	$SYS_futex, %eax
-	ENTER_KERNEL
-
-	subl	$READERS_WAKEUP, %ebx
-
-	/* Reget the lock.  */
-	movl	$1, %edx
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %edx, (%ebx)
-#else
-	cmpxchgl %edx, MUTEX(%ebx)
-#endif
-	jnz	12f
-
-13:	subl	$1, READERS_QUEUED(%ebx)
-	jmp	2b
-
-5:	xorl	%edx, %edx
-	addl	$1, NR_READERS(%ebx)
-	je	8f
-9:	LOCK
-#if MUTEX == 0
-	subl	$1, (%ebx)
-#else
-	subl	$1, MUTEX(%ebx)
-#endif
-	jne	6f
-7:
-
-	movl	%edx, %eax
-	popl	%ebx
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%ebx)
-	popl	%esi
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%esi)
-	ret
-
-	cfi_adjust_cfa_offset(8)
-	cfi_offset(%esi, -8)
-	cfi_offset(%ebx, -12)
-1:
-#if MUTEX == 0
-	movl	%ebx, %edx
-#else
-	leal	MUTEX(%ebx), %edx
-#endif
-	movzbl	PSHARED(%ebx), %ecx
-	call	__lll_lock_wait
-	jmp	2b
-
-14:	cmpl	%gs:TID, %eax
-	jne	3b
-	/* Deadlock detected.  */
-	movl	$EDEADLK, %edx
-	jmp	9b
-
-6:
-#if MUTEX == 0
-	movl	%ebx, %eax
-#else
-	leal	MUTEX(%ebx), %eax
-#endif
-	movzbl	PSHARED(%ebx), %ecx
-	call	__lll_unlock_wake
-	jmp	7b
-
-	/* Overflow.  */
-8:	subl	$1, NR_READERS(%ebx)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-	/* Overflow.  */
-4:	subl	$1, READERS_QUEUED(%ebx)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-10:
-#if MUTEX == 0
-	movl	%ebx, %eax
-#else
-	leal	MUTEX(%ebx), %eax
-#endif
-	movzbl	PSHARED(%ebx), %ecx
-	call	__lll_unlock_wake
-	jmp	11b
-
-12:
-#if MUTEX == 0
-	movl	%ebx, %edx
-#else
-	leal	MUTEX(%ebx), %edx
-#endif
-	movzbl	PSHARED(%ebx), %ecx
-	call	__lll_lock_wait
-	jmp	13b
-	cfi_endproc
-	.size	__pthread_rwlock_rdlock,.-__pthread_rwlock_rdlock
-
-strong_alias (__pthread_rwlock_rdlock, pthread_rwlock_rdlock)
-hidden_def (__pthread_rwlock_rdlock)
diff --git a/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S b/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
deleted file mode 100644
index bc1001c..0000000
--- a/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
+++ /dev/null
@@ -1,243 +0,0 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <lowlevellock.h>
-#include <lowlevelrwlock.h>
-#include <pthread-errnos.h>
-#include <kernel-features.h>
-
-
-	.text
-
-	.globl	pthread_rwlock_timedrdlock
-	.type	pthread_rwlock_timedrdlock,@function
-	.align	16
-pthread_rwlock_timedrdlock:
-	cfi_startproc
-	pushl	%esi
-	cfi_adjust_cfa_offset(4)
-	pushl	%edi
-	cfi_adjust_cfa_offset(4)
-	pushl	%ebx
-	cfi_adjust_cfa_offset(4)
-	pushl	%ebp
-	cfi_adjust_cfa_offset(4)
-	cfi_offset(%esi, -8)
-	cfi_offset(%edi, -12)
-	cfi_offset(%ebx, -16)
-	cfi_offset(%ebp, -20)
-	subl	$8, %esp
-	cfi_adjust_cfa_offset(8)
-
-	movl	28(%esp), %ebp
-	movl	32(%esp), %edi
-
-	/* Get the lock.  */
-	movl	$1, %edx
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %edx, (%ebp)
-#else
-	cmpxchgl %edx, MUTEX(%ebp)
-#endif
-	jnz	1f
-
-2:	movl	WRITER(%ebp), %eax
-	testl	%eax, %eax
-	jne	14f
-	cmpl	$0, WRITERS_QUEUED(%ebp)
-	je	5f
-	cmpb	$0, FLAGS(%ebp)
-	je	5f
-
-	/* Check the value of the timeout parameter.  */
-3:	cmpl	$1000000000, 4(%edi)
-	jae	19f
-
-	addl	$1, READERS_QUEUED(%ebp)
-	je	4f
-
-	movl	READERS_WAKEUP(%ebp), %esi
-
-	LOCK
-#if MUTEX == 0
-	subl	$1, (%ebp)
-#else
-	subl	$1, MUTEX(%ebp)
-#endif
-	jne	10f
-
-	/* Get current time.  */
-11:	movl	%esp, %ebx
-	xorl	%ecx, %ecx
-	movl	$__NR_gettimeofday, %eax
-	ENTER_KERNEL
-
-	/* Compute relative timeout.  */
-	movl	4(%esp), %eax
-	movl	$1000, %edx
-	mul	%edx		/* Milli seconds to nano seconds.  */
-	movl	(%edi), %ecx
-	movl	4(%edi), %edx
-	subl	(%esp), %ecx
-	subl	%eax, %edx
-	jns	15f
-	addl	$1000000000, %edx
-	subl	$1, %ecx
-15:	testl	%ecx, %ecx
-	js	16f		/* Time is already up.  */
-
-	/* Futex call.  */
-	movl	%ecx, (%esp)	/* Store relative timeout.  */
-	movl	%edx, 4(%esp)
-
-	movl	%esi, %edx
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movzbl	PSHARED(%ebp), %ecx
-	xorl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-#else
-	movzbl	PSHARED(%ebp), %ecx
-# if FUTEX_WAIT != 0
-	orl	$FUTEX_WAIT, %ecx
-# endif
-	xorl	%gs:PRIVATE_FUTEX, %ecx
-#endif
-	movl	%esp, %esi
-	leal	READERS_WAKEUP(%ebp), %ebx
-	movl	$SYS_futex, %eax
-	ENTER_KERNEL
-	movl	%eax, %esi
-17:
-
-	/* Reget the lock.  */
-	movl	$1, %edx
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %edx, (%ebp)
-#else
-	cmpxchgl %edx, MUTEX(%ebp)
-#endif
-	jnz	12f
-
-13:	subl	$1, READERS_QUEUED(%ebp)
-	cmpl	$-ETIMEDOUT, %esi
-	jne	2b
-
-18:	movl	$ETIMEDOUT, %edx
-	jmp	9f
-
-
-5:	xorl	%edx, %edx
-	addl	$1, NR_READERS(%ebp)
-	je	8f
-9:	LOCK
-#if MUTEX == 0
-	subl	$1, (%ebp)
-#else
-	subl	$1, MUTEX(%ebp)
-#endif
-	jne	6f
-
-7:	movl	%edx, %eax
-
-	addl	$8, %esp
-	cfi_adjust_cfa_offset(-8)
-	popl	%ebp
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%ebp)
-	popl	%ebx
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%ebx)
-	popl	%edi
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%edi)
-	popl	%esi
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%esi)
-	ret
-
-	cfi_adjust_cfa_offset(24)
-	cfi_offset(%esi, -8)
-	cfi_offset(%edi, -12)
-	cfi_offset(%ebx, -16)
-	cfi_offset(%ebp, -20)
-1:
-#if MUTEX == 0
-	movl	%ebp, %edx
-#else
-	leal	MUTEX(%ebp), %edx
-#endif
-	movzbl	PSHARED(%ebp), %ecx
-	call	__lll_lock_wait
-	jmp	2b
-
-14:	cmpl	%gs:TID, %eax
-	jne	3b
-	movl	$EDEADLK, %edx
-	jmp	9b
-
-6:
-#if MUTEX == 0
-	movl	%ebp, %eax
-#else
-	leal	MUTEX(%ebp), %eax
-#endif
-	movzbl	PSHARED(%ebp), %ecx
-	call	__lll_unlock_wake
-	jmp	7b
-
-	/* Overflow.  */
-8:	subl	$1, NR_READERS(%ebp)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-	/* Overflow.  */
-4:	subl	$1, READERS_QUEUED(%ebp)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-10:
-#if MUTEX == 0
-	movl	%ebp, %eax
-#else
-	leal	MUTEX(%ebp), %eax
-#endif
-	movzbl	PSHARED(%ebp), %ecx
-	call	__lll_unlock_wake
-	jmp	11b
-
-12:
-#if MUTEX == 0
-	movl	%ebp, %edx
-#else
-	leal	MUTEX(%ebp), %edx
-#endif
-	movzbl	PSHARED(%ebp), %ecx
-	call	__lll_lock_wait
-	jmp	13b
-
-16:	movl	$-ETIMEDOUT, %esi
-	jmp	17b
-
-19:	movl	$EINVAL, %edx
-	jmp	9b
-	cfi_endproc
-	.size	pthread_rwlock_timedrdlock,.-pthread_rwlock_timedrdlock
diff --git a/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S b/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
deleted file mode 100644
index 9abba58..0000000
--- a/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
+++ /dev/null
@@ -1,236 +0,0 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <lowlevellock.h>
-#include <lowlevelrwlock.h>
-#include <pthread-errnos.h>
-#include <kernel-features.h>
-
-
-	.text
-
-	.globl	pthread_rwlock_timedwrlock
-	.type	pthread_rwlock_timedwrlock,@function
-	.align	16
-pthread_rwlock_timedwrlock:
-	cfi_startproc
-	pushl	%esi
-	cfi_adjust_cfa_offset(4)
-	pushl	%edi
-	cfi_adjust_cfa_offset(4)
-	pushl	%ebx
-	cfi_adjust_cfa_offset(4)
-	pushl	%ebp
-	cfi_adjust_cfa_offset(4)
-	cfi_offset(%esi, -8)
-	cfi_offset(%edi, -12)
-	cfi_offset(%ebx, -16)
-	cfi_offset(%ebp, -20)
-	subl	$8, %esp
-	cfi_adjust_cfa_offset(8)
-
-	movl	28(%esp), %ebp
-	movl	32(%esp), %edi
-
-	/* Get the lock.  */
-	movl	$1, %edx
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %edx, (%ebp)
-#else
-	cmpxchgl %edx, MUTEX(%ebp)
-#endif
-	jnz	1f
-
-2:	movl	WRITER(%ebp), %eax
-	testl	%eax, %eax
-	jne	14f
-	cmpl	$0, NR_READERS(%ebp)
-	je	5f
-
-	/* Check the value of the timeout parameter.  */
-3:	cmpl	$1000000000, 4(%edi)
-	jae	19f
-
-	addl	$1, WRITERS_QUEUED(%ebp)
-	je	4f
-
-	movl	WRITERS_WAKEUP(%ebp), %esi
-
-	LOCK
-#if MUTEX == 0
-	subl	$1, (%ebp)
-#else
-	subl	$1, MUTEX(%ebp)
-#endif
-	jne	10f
-
-	/* Get current time.  */
-11:	movl	%esp, %ebx
-	xorl	%ecx, %ecx
-	movl	$__NR_gettimeofday, %eax
-	ENTER_KERNEL
-
-	/* Compute relative timeout.  */
-	movl	4(%esp), %eax
-	movl	$1000, %edx
-	mul	%edx		/* Milli seconds to nano seconds.  */
-	movl	(%edi), %ecx
-	movl	4(%edi), %edx
-	subl	(%esp), %ecx
-	subl	%eax, %edx
-	jns	15f
-	addl	$1000000000, %edx
-	subl	$1, %ecx
-15:	testl	%ecx, %ecx
-	js	16f		/* Time is already up.  */
-
-	/* Futex call.  */
-	movl	%ecx, (%esp)	/* Store relative timeout.  */
-	movl	%edx, 4(%esp)
-
-	movl	%esi, %edx
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movzbl	PSHARED(%ebp), %ecx
-	xorl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-#else
-	movzbl	PSHARED(%ebp), %ecx
-# if FUTEX_WAIT != 0
-	orl	$FUTEX_WAIT, %ecx
-# endif
-	xorl	%gs:PRIVATE_FUTEX, %ecx
-#endif
-	movl	%esp, %esi
-	leal	WRITERS_WAKEUP(%ebp), %ebx
-	movl	$SYS_futex, %eax
-	ENTER_KERNEL
-	movl	%eax, %esi
-17:
-
-	/* Reget the lock.  */
-	movl	$1, %edx
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %edx, (%ebp)
-#else
-	cmpxchgl %edx, MUTEX(%ebp)
-#endif
-	jnz	12f
-
-13:	subl	$1, WRITERS_QUEUED(%ebp)
-	cmpl	$-ETIMEDOUT, %esi
-	jne	2b
-
-18:	movl	$ETIMEDOUT, %edx
-	jmp	9f
-
-
-5:	xorl	%edx, %edx
-	movl	%gs:TID, %eax
-	movl	%eax, WRITER(%ebp)
-9:	LOCK
-#if MUTEX == 0
-	subl	$1, (%ebp)
-#else
-	subl	$1, MUTEX(%ebp)
-#endif
-	jne	6f
-
-7:	movl	%edx, %eax
-
-	addl	$8, %esp
-	cfi_adjust_cfa_offset(-8)
-	popl	%ebp
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%ebp)
-	popl	%ebx
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%ebx)
-	popl	%edi
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%edi)
-	popl	%esi
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%esi)
-	ret
-
-	cfi_adjust_cfa_offset(24)
-	cfi_offset(%esi, -8)
-	cfi_offset(%edi, -12)
-	cfi_offset(%ebx, -16)
-	cfi_offset(%ebp, -20)
-1:
-#if MUTEX == 0
-	movl	%ebp, %edx
-#else
-	leal	MUTEX(%ebp), %edx
-#endif
-	movzbl	PSHARED(%ebp), %ecx
-	call	__lll_lock_wait
-	jmp	2b
-
-14:	cmpl	%gs:TID, %eax
-	jne	3b
-20:	movl	$EDEADLK, %edx
-	jmp	9b
-
-6:
-#if MUTEX == 0
-	movl	%ebp, %eax
-#else
-	leal	MUTEX(%ebp), %eax
-#endif
-	movzbl	PSHARED(%ebp), %ecx
-	call	__lll_unlock_wake
-	jmp	7b
-
-	/* Overflow.  */
-4:	subl	$1, WRITERS_QUEUED(%ebp)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-10:
-#if MUTEX == 0
-	movl	%ebp, %eax
-#else
-	leal	MUTEX(%ebp), %eax
-#endif
-	movzbl	PSHARED(%ebp), %ecx
-	call	__lll_unlock_wake
-	jmp	11b
-
-12:
-#if MUTEX == 0
-	movl	%ebp, %edx
-#else
-	leal	MUTEX(%ebp), %edx
-#endif
-	movzbl	PSHARED(%ebp), %ecx
-	call	__lll_lock_wait
-	jmp	13b
-
-16:	movl	$-ETIMEDOUT, %esi
-	jmp	17b
-
-19:	movl	$EINVAL, %edx
-	jmp	9b
-	cfi_endproc
-	.size	pthread_rwlock_timedwrlock,.-pthread_rwlock_timedwrlock
diff --git a/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S b/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
deleted file mode 100644
index 738c067..0000000
--- a/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
+++ /dev/null
@@ -1,151 +0,0 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <lowlevellock.h>
-#include <lowlevelrwlock.h>
-#include <kernel-features.h>
-
-
-	.text
-
-	.globl	__pthread_rwlock_unlock
-	.type	__pthread_rwlock_unlock,@function
-	.align	16
-__pthread_rwlock_unlock:
-	cfi_startproc
-	pushl	%ebx
-	cfi_adjust_cfa_offset(4)
-	pushl	%edi
-	cfi_adjust_cfa_offset(4)
-	cfi_offset(%ebx, -8)
-	cfi_offset(%edi, -12)
-
-	movl	12(%esp), %edi
-
-	/* Get the lock.  */
-	movl	$1, %edx
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %edx, (%edi)
-#else
-	cmpxchgl %edx, MUTEX(%edi)
-#endif
-	jnz	1f
-
-2:	cmpl	$0, WRITER(%edi)
-	jne	5f
-	subl	$1, NR_READERS(%edi)
-	jnz	6f
-
-5:	movl	$0, WRITER(%edi)
-
-	movl	$1, %edx
-	leal	WRITERS_WAKEUP(%edi), %ebx
-	cmpl	$0, WRITERS_QUEUED(%edi)
-	jne	0f
-
-	/* If also no readers waiting nothing to do.  */
-	cmpl	$0, READERS_QUEUED(%edi)
-	je	6f
-
-	movl	$0x7fffffff, %edx
-	leal	READERS_WAKEUP(%edi), %ebx
-
-0:	addl	$1, (%ebx)
-	LOCK
-#if MUTEX == 0
-	subl	$1, (%edi)
-#else
-	subl	$1, MUTEX(%edi)
-#endif
-	jne	7f
-
-8:
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movzbl	PSHARED(%edi), %ecx
-	xorl	$FUTEX_PRIVATE_FLAG|FUTEX_WAKE, %ecx
-#else
-	movzbl	PSHARED(%edi), %ecx
-	orl	$FUTEX_WAKE, %ecx
-	xorl	%gs:PRIVATE_FUTEX, %ecx
-#endif
-	movl	$SYS_futex, %eax
-	ENTER_KERNEL
-
-	xorl	%eax, %eax
-	popl	%edi
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%edi)
-	popl	%ebx
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%ebx)
-	ret
-
-	cfi_adjust_cfa_offset(8)
-	cfi_offset(%ebx, -8)
-	cfi_offset(%edi, -12)
-	.align	16
-6:	LOCK
-#if MUTEX == 0
-	subl	$1, (%edi)
-#else
-	subl	$1, MUTEX(%edi)
-#endif
-	jne	3f
-
-4:	xorl	%eax, %eax
-	popl	%edi
-	popl	%ebx
-	ret
-
-1:
-#if MUTEX == 0
-	movl	%edi, %edx
-#else
-	leal	MUTEX(%edi), %edx
-#endif
-	movzbl	PSHARED(%edi), %ecx
-	call	__lll_lock_wait
-	jmp	2b
-
-3:
-#if MUTEX == 0
-	movl	%edi, %eax
-#else
-	leal	MUTEX(%edi), %eax
-#endif
-	movzbl	PSHARED(%edi), %ecx
-	call	__lll_unlock_wake
-	jmp	4b
-
-7:
-#if MUTEX == 0
-	movl	%edi, %eax
-#else
-	leal	MUTEX(%edi), %eax
-#endif
-	movzbl	PSHARED(%edi), %ecx
-	call	__lll_unlock_wake
-	jmp	8b
-	cfi_endproc
-	.size	__pthread_rwlock_unlock,.-__pthread_rwlock_unlock
-
-strong_alias (__pthread_rwlock_unlock, pthread_rwlock_unlock)
-hidden_def (__pthread_rwlock_unlock)
diff --git a/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S b/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
deleted file mode 100644
index 8345cae..0000000
--- a/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
+++ /dev/null
@@ -1,183 +0,0 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <lowlevellock.h>
-#include <lowlevelrwlock.h>
-#include <pthread-errnos.h>
-#include <kernel-features.h>
-
-#include <stap-probe.h>
-
-	.text
-
-	.globl	__pthread_rwlock_wrlock
-	.type	__pthread_rwlock_wrlock,@function
-	.align	16
-__pthread_rwlock_wrlock:
-	cfi_startproc
-	pushl	%esi
-	cfi_adjust_cfa_offset(4)
-	pushl	%ebx
-	cfi_adjust_cfa_offset(4)
-	cfi_offset(%esi, -8)
-	cfi_offset(%ebx, -12)
-
-	xorl	%esi, %esi
-	movl	12(%esp), %ebx
-
-	LIBC_PROBE (wrlock_entry, 1, %ebx)
-
-	/* Get the lock.  */
-	movl	$1, %edx
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %edx, (%ebx)
-#else
-	cmpxchgl %edx, MUTEX(%ebx)
-#endif
-	jnz	1f
-
-2:	movl	WRITER(%ebx), %eax
-	testl	%eax, %eax
-	jne	14f
-	cmpl	$0, NR_READERS(%ebx)
-	je	5f
-
-3:	addl	$1, WRITERS_QUEUED(%ebx)
-	je	4f
-
-	movl	WRITERS_WAKEUP(%ebx), %edx
-
-	LOCK
-#if MUTEX == 0
-	subl	$1, (%ebx)
-#else
-	subl	$1, MUTEX(%ebx)
-#endif
-	jne	10f
-
-11:
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movzbl	PSHARED(%ebx), %ecx
-	xorl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %ecx
-#else
-	movzbl	PSHARED(%ebx), %ecx
-# if FUTEX_WAIT != 0
-	orl	$FUTEX_WAIT, %ecx
-# endif
-	xorl	%gs:PRIVATE_FUTEX, %ecx
-#endif
-	addl	$WRITERS_WAKEUP, %ebx
-	movl	$SYS_futex, %eax
-	ENTER_KERNEL
-
-	subl	$WRITERS_WAKEUP, %ebx
-
-	/* Reget the lock.  */
-	movl	$1, %edx
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %edx, (%ebx)
-#else
-	cmpxchgl %edx, MUTEX(%ebx)
-#endif
-	jnz	12f
-
-13:	subl	$1, WRITERS_QUEUED(%ebx)
-	jmp	2b
-
-5:	xorl	%edx, %edx
-	movl	%gs:TID, %eax
-	movl	%eax, WRITER(%ebx)
-9:	LOCK
-#if MUTEX == 0
-	subl	$1, (%ebx)
-#else
-	subl	$1, MUTEX(%ebx)
-#endif
-	jne	6f
-7:
-
-	movl	%edx, %eax
-	popl	%ebx
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%ebx)
-	popl	%esi
-	cfi_adjust_cfa_offset(-4)
-	cfi_restore(%esi)
-	ret
-
-	cfi_adjust_cfa_offset(8)
-	cfi_offset(%esi, -8)
-	cfi_offset(%ebx, -12)
-1:
-#if MUTEX == 0
-	movl	%ebx, %edx
-#else
-	leal	MUTEX(%ebx), %edx
-#endif
-	movzbl	PSHARED(%ebx), %ecx
-	call	__lll_lock_wait
-	jmp	2b
-
-14:	cmpl	%gs:TID	, %eax
-	jne	3b
-	movl	$EDEADLK, %edx
-	jmp	9b
-
-6:
-#if MUTEX == 0
-	movl	%ebx, %eax
-#else
-	leal	MUTEX(%ebx), %eax
-#endif
-	movzbl	PSHARED(%ebx), %ecx
-	call	__lll_unlock_wake
-	jmp	7b
-
-4:	subl	$1, WRITERS_QUEUED(%ebx)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-10:
-#if MUTEX == 0
-	movl	%ebx, %eax
-#else
-	leal	MUTEX(%ebx), %eax
-#endif
-	movzbl	PSHARED(%ebx), %ecx
-	call	__lll_unlock_wake
-	jmp	11b
-
-12:
-#if MUTEX == 0
-	movl	%ebx, %edx
-#else
-	leal	MUTEX(%ebx), %edx
-#endif
-	movzbl	PSHARED(%ebx), %ecx
-	call	__lll_lock_wait
-	jmp	13b
-	cfi_endproc
-	.size	__pthread_rwlock_wrlock,.-__pthread_rwlock_wrlock
-
-strong_alias (__pthread_rwlock_wrlock, pthread_rwlock_wrlock)
-hidden_def (__pthread_rwlock_wrlock)
diff --git a/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S b/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S
deleted file mode 100644
index 85127c7..0000000
--- a/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "../i486/pthread_rwlock_rdlock.S"
diff --git a/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S b/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S
deleted file mode 100644
index 5a843e5..0000000
--- a/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "../i486/pthread_rwlock_timedrdlock.S"
diff --git a/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S b/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S
deleted file mode 100644
index a8ca4cf..0000000
--- a/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "../i486/pthread_rwlock_timedwrlock.S"
diff --git a/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S b/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S
deleted file mode 100644
index 8018c8f..0000000
--- a/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "../i486/pthread_rwlock_unlock.S"
diff --git a/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S b/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S
deleted file mode 100644
index 0b4cfa8..0000000
--- a/sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "../i486/pthread_rwlock_wrlock.S"
diff --git a/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S b/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S
deleted file mode 100644
index 85127c7..0000000
--- a/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "../i486/pthread_rwlock_rdlock.S"
diff --git a/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S b/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S
deleted file mode 100644
index 5a843e5..0000000
--- a/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "../i486/pthread_rwlock_timedrdlock.S"
diff --git a/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S b/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S
deleted file mode 100644
index a8ca4cf..0000000
--- a/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "../i486/pthread_rwlock_timedwrlock.S"
diff --git a/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S b/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S
deleted file mode 100644
index e52344b..0000000
--- a/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#define HAVE_CMOV	1
-#include "../i486/pthread_rwlock_unlock.S"
diff --git a/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S b/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S
deleted file mode 100644
index 0b4cfa8..0000000
--- a/sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (C) 2003-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "../i486/pthread_rwlock_wrlock.S"
diff --git a/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S b/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
deleted file mode 100644
index 3bbb4c7..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
+++ /dev/null
@@ -1,177 +0,0 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <lowlevellock.h>
-#include <lowlevelrwlock.h>
-#include <pthread-errnos.h>
-#include <kernel-features.h>
-#include <stap-probe.h>
-
-	.text
-
-	.globl	__pthread_rwlock_rdlock
-	.type	__pthread_rwlock_rdlock,@function
-	.align	16
-__pthread_rwlock_rdlock:
-	cfi_startproc
-
-	LIBC_PROBE (rdlock_entry, 1, %rdi)
-
-	xorq	%r10, %r10
-
-	/* Get the lock.  */
-	movl	$1, %esi
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %esi, (%rdi)
-#else
-	cmpxchgl %esi, MUTEX(%rdi)
-#endif
-	jnz	1f
-
-2:	movl	WRITER(%rdi), %eax
-	testl	%eax, %eax
-	jne	14f
-	cmpl	$0, WRITERS_QUEUED(%rdi)
-	je	5f
-	cmpl	$0, FLAGS(%rdi)
-	je	5f
-
-3:	incl	READERS_QUEUED(%rdi)
-	je	4f
-
-	movl	READERS_WAKEUP(%rdi), %edx
-
-	LOCK
-#if MUTEX == 0
-	decl	(%rdi)
-#else
-	decl	MUTEX(%rdi)
-#endif
-	jne	10f
-
-11:
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %esi
-	xorl	PSHARED(%rdi), %esi
-#else
-# if FUTEX_WAIT == 0
-	movl	PSHARED(%rdi), %esi
-# else
-	movl	$FUTEX_WAIT, %esi
-	orl	PSHARED(%rdi), %esi
-# endif
-	xorl	%fs:PRIVATE_FUTEX, %esi
-#endif
-	addq	$READERS_WAKEUP, %rdi
-	movl	$SYS_futex, %eax
-	syscall
-
-	subq	$READERS_WAKEUP, %rdi
-
-	/* Reget the lock.  */
-	movl	$1, %esi
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %esi, (%rdi)
-#else
-	cmpxchgl %esi, MUTEX(%rdi)
-#endif
-	jnz	12f
-
-13:	decl	READERS_QUEUED(%rdi)
-	jmp	2b
-
-5:	xorl	%edx, %edx
-	incl	NR_READERS(%rdi)
-	je	8f
-9:	LOCK
-#if MUTEX == 0
-	decl	(%rdi)
-#else
-	decl	MUTEX(%rdi)
-#endif
-	jne	6f
-7:
-
-	movq	%rdx, %rax
-	retq
-
-1:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_lock_wait
-#if MUTEX != 0
-	subq	$MUTEX, %rdi
-#endif
-	jmp	2b
-
-14:	cmpl	%fs:TID, %eax
-	jne	3b
-	/* Deadlock detected.  */
-	movl	$EDEADLK, %edx
-	jmp	9b
-
-6:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_unlock_wake
-#if MUTEX != 0
-	subq	$MUTEX, %rdi
-#endif
-	jmp	7b
-
-	/* Overflow.  */
-8:	decl	NR_READERS(%rdi)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-	/* Overflow.  */
-4:	decl	READERS_QUEUED(%rdi)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-10:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_unlock_wake
-#if MUTEX != 0
-	subq	$MUTEX, %rdi
-#endif
-	jmp	11b
-
-12:	movl	PSHARED(%rdi), %esi
-#if MUTEX == 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_lock_wait
-#if MUTEX != 0
-	subq	$MUTEX, %rdi
-#endif
-	jmp	13b
-	cfi_endproc
-	.size	__pthread_rwlock_rdlock,.-__pthread_rwlock_rdlock
-
-strong_alias (__pthread_rwlock_rdlock, pthread_rwlock_rdlock)
-hidden_def (__pthread_rwlock_rdlock)
diff --git a/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S b/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
deleted file mode 100644
index 40bcc04..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
+++ /dev/null
@@ -1,274 +0,0 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <lowlevellock.h>
-#include <lowlevelrwlock.h>
-#include <pthread-errnos.h>
-#include <kernel-features.h>
-
-	.text
-
-	.globl	pthread_rwlock_timedrdlock
-	.type	pthread_rwlock_timedrdlock,@function
-	.align	16
-pthread_rwlock_timedrdlock:
-	cfi_startproc
-	pushq	%r12
-	cfi_adjust_cfa_offset(8)
-	cfi_rel_offset(%r12, 0)
-	pushq	%r13
-	cfi_adjust_cfa_offset(8)
-	cfi_rel_offset(%r13, 0)
-#ifdef __ASSUME_FUTEX_CLOCK_REALTIME
-# define VALREG	%edx
-#else
-	pushq	%r14
-	cfi_adjust_cfa_offset(8)
-	cfi_rel_offset(%r14, 0)
-
-	subq	$16, %rsp
-	cfi_adjust_cfa_offset(16)
-# define VALREG %r14d
-#endif
-
-	movq	%rdi, %r12
-	movq	%rsi, %r13
-
-	/* Get the lock.  */
-	movl	$1, %esi
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %esi, (%rdi)
-#else
-	cmpxchgl %esi, MUTEX(%rdi)
-#endif
-	jnz	1f
-
-2:	movl	WRITER(%r12), %eax
-	testl	%eax, %eax
-	jne	14f
-	cmpl	$0, WRITERS_QUEUED(%r12)
-	je	5f
-	cmpl	$0, FLAGS(%r12)
-	je	5f
-
-	/* Check the value of the timeout parameter.  */
-3:	cmpq	$1000000000, 8(%r13)
-	jae	19f
-
-	incl	READERS_QUEUED(%r12)
-	je	4f
-
-	movl	READERS_WAKEUP(%r12), VALREG
-
-	/* Unlock.  */
-	LOCK
-#if MUTEX == 0
-	decl	(%r12)
-#else
-	decl	MUTEX(%r12)
-#endif
-	jne	10f
-
-11:
-#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-#  ifdef PIC
-	cmpl	$0, __have_futex_clock_realtime(%rip)
-#  else
-	cmpl	$0, __have_futex_clock_realtime
-#  endif
-	je	.Lreltmo
-#endif
-
-	cmpq	$0, (%r13)
-	js	16f		/* Time is already up.  */
-
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %esi
-	xorl	PSHARED(%r12), %esi
-	movq	%r13, %r10
-	movl	$0xffffffff, %r9d
-#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-	movl	%r14d, %edx
-#endif
-21:	leaq	READERS_WAKEUP(%r12), %rdi
-	movl	$SYS_futex, %eax
-	syscall
-	movq	%rax, %rdx
-
-#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-	.subsection 2
-.Lreltmo:
-	/* Get current time.  */
-	movq	%rsp, %rdi
-	xorl	%esi, %esi
-	/* This call works because we directly jump to a system call entry
-	   which preserves all the registers.  */
-	call	JUMPTARGET(__gettimeofday)
-
-	/* Compute relative timeout.  */
-	movq	8(%rsp), %rax
-	movl	$1000, %edi
-	mul	%rdi		/* Milli seconds to nano seconds.  */
-	movq	(%r13), %rcx
-	movq	8(%r13), %rdi
-	subq	(%rsp), %rcx
-	subq	%rax, %rdi
-	jns	15f
-	addq	$1000000000, %rdi
-	decq	%rcx
-15:	testq	%rcx, %rcx
-	js	16f		/* Time is already up.  */
-
-	/* Futex call.  */
-	movq	%rcx, (%rsp)	/* Store relative timeout.  */
-	movq	%rdi, 8(%rsp)
-
-# ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %esi
-	xorl	PSHARED(%r12), %esi
-# else
-#  if FUTEX_WAIT == 0
-	movl	PSHARED(%r12), %esi
-#  else
-	movl	$FUTEX_WAIT, %esi
-	orl	PSHARED(%r12), %esi
-#  endif
-	xorl	%fs:PRIVATE_FUTEX, %esi
-# endif
-	movq	%rsp, %r10
-	movl	%r14d, %edx
-
-	jmp	21b
-	.previous
-#endif
-
-17:	/* Reget the lock.  */
-	movl	$1, %esi
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %esi, (%r12)
-#else
-	cmpxchgl %esi, MUTEX(%r12)
-#endif
-	jnz	12f
-
-13:	decl	READERS_QUEUED(%r12)
-	cmpq	$-ETIMEDOUT, %rdx
-	jne	2b
-
-18:	movl	$ETIMEDOUT, %edx
-	jmp	9f
-
-
-5:	xorl	%edx, %edx
-	incl	NR_READERS(%r12)
-	je	8f
-9:	LOCK
-#if MUTEX == 0
-	decl	(%r12)
-#else
-	decl	MUTEX(%r12)
-#endif
-	jne	6f
-
-7:	movq	%rdx, %rax
-
-#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-	addq	$16, %rsp
-	cfi_adjust_cfa_offset(-16)
-	popq	%r14
-	cfi_adjust_cfa_offset(-8)
-	cfi_restore(%r14)
-#endif
-	popq	%r13
-	cfi_adjust_cfa_offset(-8)
-	cfi_restore(%r13)
-	popq	%r12
-	cfi_adjust_cfa_offset(-8)
-	cfi_restore(%r12)
-	retq
-
-#ifdef __ASSUME_PRIVATE_FUTEX
-	cfi_adjust_cfa_offset(16)
-	cfi_rel_offset(%r12, 8)
-	cfi_rel_offset(%r13, 0)
-#else
-	cfi_adjust_cfa_offset(40)
-	cfi_offset(%r12, -16)
-	cfi_offset(%r13, -24)
-	cfi_offset(%r14, -32)
-#endif
-1:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_lock_wait
-	jmp	2b
-
-14:	cmpl	%fs:TID, %eax
-	jne	3b
-	movl	$EDEADLK, %edx
-	jmp	9b
-
-6:	movl	PSHARED(%r12), %esi
-#if MUTEX == 0
-	movq	%r12, %rdi
-#else
-	leal	MUTEX(%r12), %rdi
-#endif
-	callq	__lll_unlock_wake
-	jmp	7b
-
-	/* Overflow.  */
-8:	decl	NR_READERS(%r12)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-	/* Overflow.  */
-4:	decl	READERS_QUEUED(%r12)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-10:	movl	PSHARED(%r12), %esi
-#if MUTEX == 0
-	movq	%r12, %rdi
-#else
-	leaq	MUTEX(%r12), %rdi
-#endif
-	callq	__lll_unlock_wake
-	jmp	11b
-
-12:	movl	PSHARED(%r12), %esi
-#if MUTEX == 0
-	movq	%r12, %rdi
-#else
-	leaq	MUTEX(%r12), %rdi
-#endif
-	callq	__lll_lock_wait
-	jmp	13b
-
-16:	movq	$-ETIMEDOUT, %rdx
-	jmp	17b
-
-19:	movl	$EINVAL, %edx
-	jmp	9b
-	cfi_endproc
-	.size	pthread_rwlock_timedrdlock,.-pthread_rwlock_timedrdlock
diff --git a/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S b/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
deleted file mode 100644
index f57ef52..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
+++ /dev/null
@@ -1,266 +0,0 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <lowlevellock.h>
-#include <lowlevelrwlock.h>
-#include <pthread-errnos.h>
-#include <kernel-features.h>
-
-	.text
-
-	.globl	pthread_rwlock_timedwrlock
-	.type	pthread_rwlock_timedwrlock,@function
-	.align	16
-pthread_rwlock_timedwrlock:
-	cfi_startproc
-	pushq	%r12
-	cfi_adjust_cfa_offset(8)
-	cfi_rel_offset(%r12, 0)
-	pushq	%r13
-	cfi_adjust_cfa_offset(8)
-	cfi_rel_offset(%r13, 0)
-#ifdef __ASSUME_FUTEX_CLOCK_REALTIME
-# define VALREG	%edx
-#else
-	pushq	%r14
-	cfi_adjust_cfa_offset(8)
-	cfi_rel_offset(%r14, 0)
-
-	subq	$16, %rsp
-	cfi_adjust_cfa_offset(16)
-# define VALREG %r14d
-#endif
-
-	movq	%rdi, %r12
-	movq	%rsi, %r13
-
-	/* Get the lock.  */
-	movl	$1, %esi
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %esi, (%rdi)
-#else
-	cmpxchgl %esi, MUTEX(%rdi)
-#endif
-	jnz	1f
-
-2:	movl	WRITER(%r12), %eax
-	testl	%eax, %eax
-	jne	14f
-	cmpl	$0, NR_READERS(%r12)
-	je	5f
-
-	/* Check the value of the timeout parameter.  */
-3:	cmpq	$1000000000, 8(%r13)
-	jae	19f
-
-	incl	WRITERS_QUEUED(%r12)
-	je	4f
-
-	movl	WRITERS_WAKEUP(%r12), VALREG
-
-	LOCK
-#if MUTEX == 0
-	decl	(%r12)
-#else
-	decl	MUTEX(%r12)
-#endif
-	jne	10f
-
-11:
-#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-#  ifdef PIC
-	cmpl	$0, __have_futex_clock_realtime(%rip)
-#  else
-	cmpl	$0, __have_futex_clock_realtime
-#  endif
-	je	.Lreltmo
-#endif
-
-	cmpq	$0, (%r13)
-	js	16f		/* Time is already up. */
-
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, %esi
-	xorl	PSHARED(%r12), %esi
-	movq	%r13, %r10
-	movl	$0xffffffff, %r9d
-#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-	movl	%r14d, %edx
-#endif
-21:	leaq	WRITERS_WAKEUP(%r12), %rdi
-	movl	$SYS_futex, %eax
-	syscall
-	movq	%rax, %rdx
-
-#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-	.subsection 2
-.Lreltmo:
-	/* Get current time.  */
-	movq	%rsp, %rdi
-	xorl	%esi, %esi
-	/* This call works because we directly jump to a system call entry
-	   which preserves all the registers.  */
-	call	JUMPTARGET(__gettimeofday)
-
-	/* Compute relative timeout.  */
-	movq	8(%rsp), %rax
-	movl	$1000, %edi
-	mul	%rdi		/* Milli seconds to nano seconds.  */
-	movq	(%r13), %rcx
-	movq	8(%r13), %rdi
-	subq	(%rsp), %rcx
-	subq	%rax, %rdi
-	jns	15f
-	addq	$1000000000, %rdi
-	decq	%rcx
-15:	testq	%rcx, %rcx
-	js	16f		/* Time is already up.  */
-
-	/* Futex call.  */
-	movq	%rcx, (%rsp)	/* Store relative timeout.  */
-	movq	%rdi, 8(%rsp)
-
-# ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %esi
-	xorl	PSHARED(%r12), %esi
-# else
-#  if FUTEX_WAIT == 0
-	movl	PSHARED(%r12), %esi
-#  else
-	movl	$FUTEX_WAIT, %esi
-	orl	PSHARED(%r12), %esi
-#  endif
-	xorl	%fs:PRIVATE_FUTEX, %esi
-# endif
-	movq	%rsp, %r10
-	movl	%r14d, %edx
-
-	jmp	21b
-	.previous
-#endif
-
-17:	/* Reget the lock.  */
-	movl	$1, %esi
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %esi, (%r12)
-#else
-	cmpxchgl %esi, MUTEX(%r12)
-#endif
-	jnz	12f
-
-13:	decl	WRITERS_QUEUED(%r12)
-	cmpq	$-ETIMEDOUT, %rdx
-	jne	2b
-
-18:	movl	$ETIMEDOUT, %edx
-	jmp	9f
-
-
-5:	xorl	%edx, %edx
-	movl	%fs:TID, %eax
-	movl	%eax, WRITER(%r12)
-9:	LOCK
-#if MUTEX == 0
-	decl	(%r12)
-#else
-	decl	MUTEX(%r12)
-#endif
-	jne	6f
-
-7:	movq	%rdx, %rax
-
-#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
-	addq	$16, %rsp
-	cfi_adjust_cfa_offset(-16)
-	popq	%r14
-	cfi_adjust_cfa_offset(-8)
-	cfi_restore(%r14)
-#endif
-	popq	%r13
-	cfi_adjust_cfa_offset(-8)
-	cfi_restore(%r13)
-	popq	%r12
-	cfi_adjust_cfa_offset(-8)
-	cfi_restore(%r12)
-	retq
-
-#ifdef __ASSUME_PRIVATE_FUTEX
-	cfi_adjust_cfa_offset(16)
-	cfi_rel_offset(%r12, 8)
-	cfi_rel_offset(%r13, 0)
-#else
-	cfi_adjust_cfa_offset(40)
-	cfi_offset(%r12, -16)
-	cfi_offset(%r13, -24)
-	cfi_offset(%r14, -32)
-#endif
-1:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_lock_wait
-	jmp	2b
-
-14:	cmpl	%fs:TID, %eax
-	jne	3b
-20:	movl	$EDEADLK, %edx
-	jmp	9b
-
-6:	movl	PSHARED(%r12), %esi
-#if MUTEX == 0
-	movq	%r12, %rdi
-#else
-	leal	MUTEX(%r12), %rdi
-#endif
-	callq	__lll_unlock_wake
-	jmp	7b
-
-	/* Overflow.  */
-4:	decl	WRITERS_QUEUED(%r12)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-10:	movl	PSHARED(%r12), %esi
-#if MUTEX == 0
-	movq	%r12, %rdi
-#else
-	leaq	MUTEX(%r12), %rdi
-#endif
-	callq	__lll_unlock_wake
-	jmp	11b
-
-12:	movl	PSHARED(%r12), %esi
-#if MUTEX == 0
-	movq	%r12, %rdi
-#else
-	leaq	MUTEX(%r12), %rdi
-#endif
-	callq	__lll_lock_wait
-	jmp	13b
-
-16:	movq	$-ETIMEDOUT, %rdx
-	jmp	17b
-
-19:	movl	$EINVAL, %edx
-	jmp	9b
-	cfi_endproc
-	.size	pthread_rwlock_timedwrlock,.-pthread_rwlock_timedwrlock
diff --git a/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S b/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
deleted file mode 100644
index d779f7b..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
+++ /dev/null
@@ -1,126 +0,0 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <lowlevellock.h>
-#include <lowlevelrwlock.h>
-#include <kernel-features.h>
-
-
-	.text
-
-	.globl	__pthread_rwlock_unlock
-	.type	__pthread_rwlock_unlock,@function
-	.align	16
-__pthread_rwlock_unlock:
-	cfi_startproc
-	/* Get the lock.  */
-	movl	$1, %esi
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %esi, (%rdi)
-#else
-	cmpxchgl %esi, MUTEX(%rdi)
-#endif
-	jnz	1f
-
-2:	cmpl	$0, WRITER(%rdi)
-	jne	5f
-	decl	NR_READERS(%rdi)
-	jnz	6f
-
-5:	movl	$0, WRITER(%rdi)
-
-	movl	$1, %edx
-	leaq	WRITERS_WAKEUP(%rdi), %r10
-	cmpl	$0, WRITERS_QUEUED(%rdi)
-	jne	0f
-
-	/* If also no readers waiting nothing to do.  */
-	cmpl	$0, READERS_QUEUED(%rdi)
-	je	6f
-
-	movl	$0x7fffffff, %edx
-	leaq	READERS_WAKEUP(%rdi), %r10
-
-0:	incl	(%r10)
-	LOCK
-#if MUTEX == 0
-	decl	(%rdi)
-#else
-	decl	MUTEX(%rdi)
-#endif
-	jne	7f
-
-8:
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAKE, %esi
-	xorl	PSHARED(%rdi), %esi
-#else
-	movl	$FUTEX_WAKE, %esi
-	orl	PSHARED(%rdi), %esi
-	xorl	%fs:PRIVATE_FUTEX, %esi
-#endif
-	movl	$SYS_futex, %eax
-	movq	%r10, %rdi
-	syscall
-
-	xorl	%eax, %eax
-	retq
-
-	.align	16
-6:	LOCK
-#if MUTEX == 0
-	decl	(%rdi)
-#else
-	decl	MUTEX(%rdi)
-#endif
-	jne	3f
-
-4:	xorl	%eax, %eax
-	retq
-
-1:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_lock_wait
-#if MUTEX != 0
-	subq	$MUTEX, %rdi
-#endif
-	jmp	2b
-
-3:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_unlock_wake
-	jmp	4b
-
-7:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_unlock_wake
-	jmp	8b
-	cfi_endproc
-	.size	__pthread_rwlock_unlock,.-__pthread_rwlock_unlock
-
-strong_alias (__pthread_rwlock_unlock, pthread_rwlock_unlock)
-hidden_def (__pthread_rwlock_unlock)
diff --git a/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S b/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
deleted file mode 100644
index e444def..0000000
--- a/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
+++ /dev/null
@@ -1,165 +0,0 @@
-/* Copyright (C) 2002-2014 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sysdep.h>
-#include <lowlevellock.h>
-#include <lowlevelrwlock.h>
-#include <pthread-errnos.h>
-#include <kernel-features.h>
-#include <stap-probe.h>
-
-	.text
-
-	.globl	__pthread_rwlock_wrlock
-	.type	__pthread_rwlock_wrlock,@function
-	.align	16
-__pthread_rwlock_wrlock:
-	cfi_startproc
-
-	LIBC_PROBE (wrlock_entry, 1, %rdi)
-
-	xorq	%r10, %r10
-
-	/* Get the lock.  */
-	movl	$1, %esi
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %esi, (%rdi)
-#else
-	cmpxchgl %esi, MUTEX(%rdi)
-#endif
-	jnz	1f
-
-2:	movl	WRITER(%rdi), %eax
-	testl	%eax, %eax
-	jne	14f
-	cmpl	$0, NR_READERS(%rdi)
-	je	5f
-
-3:	incl	WRITERS_QUEUED(%rdi)
-	je	4f
-
-	movl	WRITERS_WAKEUP(%rdi), %edx
-
-	LOCK
-#if MUTEX == 0
-	decl	(%rdi)
-#else
-	decl	MUTEX(%rdi)
-#endif
-	jne	10f
-
-11:
-#ifdef __ASSUME_PRIVATE_FUTEX
-	movl	$FUTEX_PRIVATE_FLAG|FUTEX_WAIT, %esi
-	xorl	PSHARED(%rdi), %esi
-#else
-# if FUTEX_WAIT == 0
-	movl	PSHARED(%rdi), %esi
-# else
-	movl	$FUTEX_WAIT, %esi
-	orl	PSHARED(%rdi), %esi
-# endif
-	xorl	%fs:PRIVATE_FUTEX, %esi
-#endif
-	addq	$WRITERS_WAKEUP, %rdi
-	movl	$SYS_futex, %eax
-	syscall
-
-	subq	$WRITERS_WAKEUP, %rdi
-
-	/* Reget the lock.  */
-	movl	$1, %esi
-	xorl	%eax, %eax
-	LOCK
-#if MUTEX == 0
-	cmpxchgl %esi, (%rdi)
-#else
-	cmpxchgl %esi, MUTEX(%rdi)
-#endif
-	jnz	12f
-
-13:	decl	WRITERS_QUEUED(%rdi)
-	jmp	2b
-
-5:	xorl	%edx, %edx
-	movl	%fs:TID, %eax
-	movl	%eax, WRITER(%rdi)
-9:	LOCK
-#if MUTEX == 0
-	decl	(%rdi)
-#else
-	decl	MUTEX(%rdi)
-#endif
-	jne	6f
-7:
-
-	movq	%rdx, %rax
-	retq
-
-1:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_lock_wait
-#if MUTEX != 0
-	subq	$MUTEX, %rdi
-#endif
-	jmp	2b
-
-14:	cmpl	%fs:TID, %eax
-	jne	3b
-	movl	$EDEADLK, %edx
-	jmp	9b
-
-6:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_unlock_wake
-	jmp	7b
-
-4:	decl	WRITERS_QUEUED(%rdi)
-	movl	$EAGAIN, %edx
-	jmp	9b
-
-10:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_unlock_wake
-#if MUTEX != 0
-	subq	$MUTEX, %rdi
-#endif
-	jmp	11b
-
-12:	movl	PSHARED(%rdi), %esi
-#if MUTEX != 0
-	addq	$MUTEX, %rdi
-#endif
-	callq	__lll_lock_wait
-#if MUTEX != 0
-	subq	$MUTEX, %rdi
-#endif
-	jmp	13b
-	cfi_endproc
-	.size	__pthread_rwlock_wrlock,.-__pthread_rwlock_wrlock
-
-strong_alias (__pthread_rwlock_wrlock, pthread_rwlock_wrlock)
-hidden_def (__pthread_rwlock_wrlock)

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8491ed6d70b60e4c75cdcfde10ae759898547b08

commit 8491ed6d70b60e4c75cdcfde10ae759898547b08
Author: Andi Kleen <ak@linux.intel.com>
Date:   Mon Mar 31 08:07:46 2014 -0700

    Add adaptive elision to rwlocks
    
    This patch relies on the C version of the rwlocks posted earlier.
    With C rwlocks it is very straight forward to do adaptive elision
    using TSX. It is based on the infrastructure added earlier
    for mutexes, but uses its own elision macros. The macros
    are fairly general purpose and could be used for other
    elision purposes too.
    
    This version is much cleaner than the earlier assembler based
    version, and in particular implements adaptation which makes
    it safer.
    
    I changed the behavior slightly to not require any changes
    in the test suite and fully conform to all expected
    behaviors (generally at the cost of not eliding in
    various situations). In particular this means the timedlock
    variants are not elided.  Nested trylock aborts.

diff --git a/ChangeLog b/ChangeLog
index c2de6f8..6e3d2a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,53 @@
 2014-06-13  Andi Kleen  <ak@linux.intel.com>
 
+	* nptl/pthread_rwlock_rdlock.c: Include elide.h.
+        (pthread_rwlock_rdlock): Add elision.
+        * nptl/pthread_rwlock_wrlock.c: Include elide.h.
+        (pthread_rwlock_wrlock): Add elision.
+        * nptl/pthread_rwlock_trywrlock.c: Include elide.h.
+        (pthread_rwlock_trywrlock): Add elision.
+        * nptl/pthread_rwlock_tryrdlock.c: Include elide.h.
+        (pthread_rwlock_tryrdlock): Add elision.
+        * nptl/pthread_rwlock_unlock.c: Include elide.h.
+        (pthread_rwlock_tryrdlock): Add elision unlock.
+        * nptl/sysdeps/pthread/pthread.h:
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Handle new define
+        (PTHREAD_RWLOCK_INITIALIZER,
+        PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP):
+        Handle new elision field.
+        * sysdeps/x86/nptl/elide.h: New file. Add generic elision macros.
+        * sysdeps/arm/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/sh/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/tile/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/a/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/alpha/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/microblaze/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/powerpc/nptl/bits/pthreadtypes.h
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+        * sysdeps/unix/sysv/linux/x86/elision-conf.c:
+        (elision_init): Set try_xbegin to zero when no RTM.
+        * sysdeps/x86/nptl/bits/pthreadtypes.h
+        (pthread_rwlock_t): Change __pad1 to __rwelision.
+        (__PTHREAD_RWLOCK_ELISION_EXTRA): Add.
+
+2014-06-13  Andi Kleen  <ak@linux.intel.com>
+
 	* nptl/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
 	Split into __do_pthread_rwlock_rdlock and __pthread_rwlock_rdlock.
 	* nptl/pthread_rwlock_wrlock (__pthread_rwlock_wrlock):
diff --git a/nptl/pthread_rwlock_rdlock.c b/nptl/pthread_rwlock_rdlock.c
index 1df0327..6eb9e09 100644
--- a/nptl/pthread_rwlock_rdlock.c
+++ b/nptl/pthread_rwlock_rdlock.c
@@ -22,6 +22,7 @@
 #include <pthread.h>
 #include <pthreadP.h>
 #include <stap-probe.h>
+#include <elide.h>
 
 
 /* Acquire read lock for RWLOCK.  Slow path.  */
@@ -102,6 +103,12 @@ __pthread_rwlock_rdlock (pthread_rwlock_t *rwlock)
 
   LIBC_PROBE (rdlock_entry, 1, rwlock);
 
+  if (ELIDE_LOCK (rwlock->__data.__rwelision,
+		  rwlock->__data.__lock == 0
+		  && rwlock->__data.__writer == 0
+		  && rwlock->__data.__nr_readers == 0))
+    return 0;
+
   /* Make sure we are alone.  */
   lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
 
diff --git a/nptl/pthread_rwlock_tryrdlock.c b/nptl/pthread_rwlock_tryrdlock.c
index f7b1e6b..cf8d68e 100644
--- a/nptl/pthread_rwlock_tryrdlock.c
+++ b/nptl/pthread_rwlock_tryrdlock.c
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include "pthreadP.h"
 #include <lowlevellock.h>
+#include <elide.h>
 
 
 int
@@ -26,6 +27,12 @@ __pthread_rwlock_tryrdlock (pthread_rwlock_t *rwlock)
 {
   int result = EBUSY;
 
+  if (ELIDE_TRYLOCK (rwlock->__data.__rwelision,
+		     rwlock->__data.__lock == 0
+		     && rwlock->__data.__nr_readers == 0
+		     && rwlock->__data.__writer, 0))
+    return 0;
+
   lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
 
   if (rwlock->__data.__writer == 0
diff --git a/nptl/pthread_rwlock_trywrlock.c b/nptl/pthread_rwlock_trywrlock.c
index 106f157..0291fc9 100644
--- a/nptl/pthread_rwlock_trywrlock.c
+++ b/nptl/pthread_rwlock_trywrlock.c
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include "pthreadP.h"
 #include <lowlevellock.h>
+#include <elide.h>
 
 
 int
@@ -26,6 +27,12 @@ __pthread_rwlock_trywrlock (pthread_rwlock_t *rwlock)
 {
   int result = EBUSY;
 
+  if (ELIDE_TRYLOCK (rwlock->__data.__rwelision,
+		     rwlock->__data.__lock == 0
+		     && rwlock->__data.__nr_readers == 0
+		     && rwlock->__data.__writer, 1))
+    return 0;
+
   lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
 
   if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0)
diff --git a/nptl/pthread_rwlock_unlock.c b/nptl/pthread_rwlock_unlock.c
index d492383..3ebddeb 100644
--- a/nptl/pthread_rwlock_unlock.c
+++ b/nptl/pthread_rwlock_unlock.c
@@ -22,6 +22,8 @@
 #include <pthread.h>
 #include <pthreadP.h>
 #include <stap-probe.h>
+#include <elide.h>
+
 
 /* Unlock RWLOCK.  */
 int
@@ -29,6 +31,10 @@ __pthread_rwlock_unlock (pthread_rwlock_t *rwlock)
 {
   LIBC_PROBE (rwlock_unlock, 1, rwlock);
 
+  if (ELIDE_UNLOCK (rwlock->__data.__writer == 0
+		    && rwlock->__data.__nr_readers == 0))
+    return 0;
+
   lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
   if (rwlock->__data.__writer)
     rwlock->__data.__writer = 0;
diff --git a/nptl/pthread_rwlock_wrlock.c b/nptl/pthread_rwlock_wrlock.c
index de54e51..91ad82a 100644
--- a/nptl/pthread_rwlock_wrlock.c
+++ b/nptl/pthread_rwlock_wrlock.c
@@ -22,6 +22,7 @@
 #include <pthread.h>
 #include <pthreadP.h>
 #include <stap-probe.h>
+#include <elide.h>
 
 
 /* Acquire write lock for RWLOCK.  */
@@ -91,6 +92,12 @@ __pthread_rwlock_wrlock (pthread_rwlock_t *rwlock)
 {
   LIBC_PROBE (wrlock_entry, 1, rwlock);
 
+  if (ELIDE_LOCK (rwlock->__data.__rwelision,
+		  rwlock->__data.__lock == 0
+		  && rwlock->__data.__writer == 0
+		  && rwlock->__data.__nr_readers == 0))
+    return 0;
+
   /* Make sure we are alone.  */
   lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
 
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
index d70f8b3..c9f1c83 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
+++ b/nptl/sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
@@ -214,6 +214,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/arm/nptl/bits/pthreadtypes.h b/sysdeps/arm/nptl/bits/pthreadtypes.h
index 64b9e09..3ece5b9 100644
--- a/sysdeps/arm/nptl/bits/pthreadtypes.h
+++ b/sysdeps/arm/nptl/bits/pthreadtypes.h
@@ -155,6 +155,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
index 40a3e21..682a1ae 100644
--- a/sysdeps/nptl/pthread.h
+++ b/sysdeps/nptl/pthread.h
@@ -132,17 +132,17 @@ enum
 
 /* Read-write lock initializers.  */
 # define PTHREAD_RWLOCK_INITIALIZER \
-  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
+  { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
 # ifdef __USE_GNU
 #  ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED
 #   define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
-  { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,					      \
+  { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0,					      \
 	PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
 #  else
 #   if __BYTE_ORDER == __LITTLE_ENDIAN
 #    define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
   { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \
-      0, 0, 0, 0 } }
+      0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
 #   else
 #    define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
   { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\
diff --git a/sysdeps/sh/nptl/bits/pthreadtypes.h b/sysdeps/sh/nptl/bits/pthreadtypes.h
index a177f28..363a948 100644
--- a/sysdeps/sh/nptl/bits/pthreadtypes.h
+++ b/sysdeps/sh/nptl/bits/pthreadtypes.h
@@ -155,6 +155,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/sparc/nptl/bits/pthreadtypes.h b/sysdeps/sparc/nptl/bits/pthreadtypes.h
index 8c0340a..0d225a3 100644
--- a/sysdeps/sparc/nptl/bits/pthreadtypes.h
+++ b/sysdeps/sparc/nptl/bits/pthreadtypes.h
@@ -194,6 +194,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/tile/nptl/bits/pthreadtypes.h b/sysdeps/tile/nptl/bits/pthreadtypes.h
index 5ca3391..f808bb2 100644
--- a/sysdeps/tile/nptl/bits/pthreadtypes.h
+++ b/sysdeps/tile/nptl/bits/pthreadtypes.h
@@ -194,6 +194,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h
index 1a44bb6..5ad0e70 100644
--- a/sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/aarch64/nptl/bits/pthreadtypes.h
@@ -141,6 +141,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
index 3dbe612..55f1067 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
@@ -142,6 +142,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
index a79c195..d6fdc2c 100644
--- a/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
@@ -196,6 +196,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h
index 9468329..71e4785 100644
--- a/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h
@@ -143,6 +143,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
index 1e1fed8..fd46c78 100644
--- a/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h
@@ -146,6 +146,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/unix/sysv/linux/microblaze/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/microblaze/nptl/bits/pthreadtypes.h
index 9c7e620..9434453 100644
--- a/sysdeps/unix/sysv/linux/microblaze/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/microblaze/nptl/bits/pthreadtypes.h
@@ -150,6 +150,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
index cefd2b6..843031e 100644
--- a/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/mips/nptl/bits/pthreadtypes.h
@@ -203,6 +203,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h b/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
index eda3d1a..4e9c518 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
@@ -194,6 +194,8 @@ typedef union
   long int __align;
 } pthread_rwlock_t;
 
+#define __PTHREAD_RWLOCK_ELISION_EXTRA 0
+
 typedef union
 {
   char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T];
diff --git a/sysdeps/unix/sysv/linux/x86/elision-conf.c b/sysdeps/unix/sysv/linux/x86/elision-conf.c
index e6f5d6d..28e48d9 100644
--- a/sysdeps/unix/sysv/linux/x86/elision-conf.c
+++ b/sysdeps/unix/sysv/linux/x86/elision-conf.c
@@ -66,6 +66,8 @@ elision_init (int argc __attribute__ ((unused)),
 #ifdef ENABLE_LOCK_ELISION
   __pthread_force_elision = __libc_enable_secure ? 0 : __elision_available;
 #endif
+  if (!HAS_RTM)
+    __elision_aconf.retry_try_xbegin = 0; /* Disable elision on rwlocks */
 }
 
 #ifdef SHARED
diff --git a/sysdeps/x86/nptl/bits/pthreadtypes.h b/sysdeps/x86/nptl/bits/pthreadtypes.h
index b4329f6..b04c32b 100644
--- a/sysdeps/x86/nptl/bits/pthreadtypes.h
+++ b/sysdeps/x86/nptl/bits/pthreadtypes.h
@@ -184,11 +184,13 @@ typedef union
     unsigned int __nr_writers_queued;
     int __writer;
     int __shared;
-    unsigned long int __pad1;
+    signed char __rwelision;
+    unsigned char __pad1[7];
     unsigned long int __pad2;
     /* FLAGS must stay at this position in the structure to maintain
        binary compatibility.  */
     unsigned int __flags;
+# define __PTHREAD_RWLOCK_ELISION_EXTRA 0, {0, 0, 0, 0, 0, 0, 0 }
 # define __PTHREAD_RWLOCK_INT_FLAGS_SHARED	1
   } __data;
 # else
@@ -204,7 +206,8 @@ typedef union
        binary compatibility.  */
     unsigned char __flags;
     unsigned char __shared;
-    unsigned char __pad1;
+    signed char __rwelision;
+# define __PTHREAD_RWLOCK_ELISION_EXTRA 0
     unsigned char __pad2;
     int __writer;
   } __data;
diff --git a/sysdeps/x86/nptl/elide.h b/sysdeps/x86/nptl/elide.h
new file mode 100644
index 0000000..19f27e5
--- /dev/null
+++ b/sysdeps/x86/nptl/elide.h
@@ -0,0 +1,109 @@
+/* elide.h: Generic lock elision support.
+   Copyright (C) 2014 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+#ifndef ELIDE_H
+#define ELIDE_H 1
+
+#include <hle.h>
+#include <elision-conf.h>
+
+#define ACCESS_ONCE(x) (* (volatile typeof(x) *) &(x))
+
+/* Adapt elision with ADAPT_COUNT and STATUS and decide retries.  */
+
+static inline bool
+elision_adapt(uint8_t *adapt_count, unsigned int status)
+{
+  if (status & _XABORT_RETRY)
+    return false;
+  if ((status & _XABORT_EXPLICIT)
+      && _XABORT_CODE (status) == _ABORT_LOCK_BUSY)
+    {
+      /* Right now we skip here.  Better would be to wait a bit
+	 and retry.  This likely needs some spinning. Be careful
+	 to avoid writing the lock.  */
+      if (*adapt_count != __elision_aconf.skip_lock_busy)
+	ACCESS_ONCE (*adapt_count) = __elision_aconf.skip_lock_busy;
+    }
+  /* Internal abort.  There is no chance for retry.
+     Use the normal locking and next time use lock.
+     Be careful to avoid writing to the lock.  */
+  else if (*adapt_count != __elision_aconf.skip_lock_internal_abort)
+    ACCESS_ONCE (*adapt_count) = __elision_aconf.skip_lock_internal_abort;
+  return true;
+}
+
+/* is_lock_free must be executed inside the transaction */
+
+/* Returns true if lock defined by IS_LOCK_FREE was elided.
+   ADAPT_COUNT is a pointer to per-lock state variable. */
+
+#define ELIDE_LOCK(adapt_count, is_lock_free)			\
+  ({								\
+    int ret = 0;						\
+								\
+    if ((adapt_count) <= 0) 					\
+      {								\
+        for (int i = __elision_aconf.retry_try_xbegin; i > 0; i--) \
+          {							\
+            unsigned int status;				\
+	    if ((status = _xbegin ()) == _XBEGIN_STARTED)	\
+	      {							\
+	        if (is_lock_free)				\
+	          {						\
+		    ret = 1;					\
+		    break;					\
+	          }						\
+	        _xabort (_ABORT_LOCK_BUSY);			\
+	      }							\
+	    if (!elision_adapt (&(adapt_count), status))	\
+	      break;						\
+          }							\
+      }								\
+    else 							\
+      (adapt_count)--; /* missing updates ok */			\
+    ret;							\
+  })
+
+/* Returns true if lock defined by IS_LOCK_FREE was try-elided.
+   ADAPT_COUNT is a pointer to per-lock state variable.  */
+
+#define ELIDE_TRYLOCK(adapt_count, is_lock_free, write) ({	\
+  int ret = 0;						\
+  if (__elision_aconf.retry_try_xbegin > 0)		\
+    {  							\
+      if (write)					\
+        _xabort (_ABORT_NESTED_TRYLOCK);		\
+      ret = ELIDE_LOCK (adapt_count, is_lock_free);     \
+    }							\
+    ret;						\
+    })
+
+/* Returns true if lock defined by IS_LOCK_FREE was elided.  */
+
+#define ELIDE_UNLOCK(is_lock_free)		\
+  ({						\
+  int ret = 0;					\
+  if (is_lock_free)				\
+    {						\
+      _xend ();					\
+      ret = 1;					\
+    }						\
+  ret;						\
+  })
+
+#endif

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a832bdd36203fcb37fa5ad25200ef3c1ae205efe

commit a832bdd36203fcb37fa5ad25200ef3c1ae205efe
Author: Andi Kleen <ak@linux.intel.com>
Date:   Mon Mar 17 05:48:28 2014 -0700

    Add a fast path for C rd/wrlock v2
    
    One difference of the C versions to the assembler wr/rdlock
    is that the C compiler saves some registers which are unnecessary
    for the fast path in the prologue of the functions. Split the
    uncontended fast path out into a separate function. Only when contention is
    detected is the full featured function called. This makes
    the fast path code (nearly) identical to the assembler version,
    and gives uncontended performance within a few cycles.
    
    v2: Rename some functions and add space.

diff --git a/ChangeLog b/ChangeLog
index d5474af..c2de6f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-06-13  Andi Kleen  <ak@linux.intel.com>
+
+	* nptl/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
+	Split into __do_pthread_rwlock_rdlock and __pthread_rwlock_rdlock.
+	* nptl/pthread_rwlock_wrlock (__pthread_rwlock_wrlock):
+	Split into __do_pthread_rwlock_wrlock and __pthread_wrlock_rdlock.
+
 2014-06-13  Meador Inge  <meadori@codesourcery.com>
 
 	[BZ #16996]
diff --git a/nptl/pthread_rwlock_rdlock.c b/nptl/pthread_rwlock_rdlock.c
index 3773f7d..1df0327 100644
--- a/nptl/pthread_rwlock_rdlock.c
+++ b/nptl/pthread_rwlock_rdlock.c
@@ -24,39 +24,16 @@
 #include <stap-probe.h>
 
 
-/* Acquire read lock for RWLOCK.  */
-int
-__pthread_rwlock_rdlock (rwlock)
-     pthread_rwlock_t *rwlock;
+/* Acquire read lock for RWLOCK.  Slow path.  */
+static int __attribute__((noinline))
+__pthread_rwlock_rdlock_slow (pthread_rwlock_t *rwlock)
 {
   int result = 0;
 
-  LIBC_PROBE (rdlock_entry, 1, rwlock);
-
-  /* Make sure we are alone.  */
-  lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
+  /* Lock is taken in caller.  */
 
   while (1)
     {
-      /* Get the rwlock if there is no writer...  */
-      if (rwlock->__data.__writer == 0
-	  /* ...and if either no writer is waiting or we prefer readers.  */
-	  && (!rwlock->__data.__nr_writers_queued
-	      || PTHREAD_RWLOCK_PREFER_READER_P (rwlock)))
-	{
-	  /* Increment the reader counter.  Avoid overflow.  */
-	  if (__glibc_unlikely (++rwlock->__data.__nr_readers == 0))
-	    {
-	      /* Overflow on number of readers.	 */
-	      --rwlock->__data.__nr_readers;
-	      result = EAGAIN;
-	    }
-	  else
-	    LIBC_PROBE (rdlock_acquire_read, 1, rwlock);
-
-	  break;
-	}
-
       /* Make sure we are not holding the rwlock as a writer.  This is
 	 a deadlock situation we recognize and report.  */
       if (__builtin_expect (rwlock->__data.__writer
@@ -88,6 +65,25 @@ __pthread_rwlock_rdlock (rwlock)
       lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
 
       --rwlock->__data.__nr_readers_queued;
+
+      /* Get the rwlock if there is no writer...  */
+      if (rwlock->__data.__writer == 0
+	  /* ...and if either no writer is waiting or we prefer readers.  */
+	  && (!rwlock->__data.__nr_writers_queued
+	      || PTHREAD_RWLOCK_PREFER_READER_P (rwlock)))
+	{
+	  /* Increment the reader counter.  Avoid overflow.  */
+	  if (__glibc_unlikely (++rwlock->__data.__nr_readers == 0))
+	    {
+	      /* Overflow on number of readers.	 */
+	      --rwlock->__data.__nr_readers;
+	      result = EAGAIN;
+	    }
+	  else
+	    LIBC_PROBE (rdlock_acquire_read, 1, rwlock);
+
+	  break;
+	}
     }
 
   /* We are done, free the lock.  */
@@ -96,5 +92,43 @@ __pthread_rwlock_rdlock (rwlock)
   return result;
 }
 
+
+/* Fast path of acquiring read lock on RWLOCK.  */
+
+int
+__pthread_rwlock_rdlock (pthread_rwlock_t *rwlock)
+{
+  int result = 0;
+
+  LIBC_PROBE (rdlock_entry, 1, rwlock);
+
+  /* Make sure we are alone.  */
+  lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
+
+  /* Get the rwlock if there is no writer...  */
+  if (rwlock->__data.__writer == 0
+      /* ...and if either no writer is waiting or we prefer readers.  */
+      && (!rwlock->__data.__nr_writers_queued
+	  || PTHREAD_RWLOCK_PREFER_READER_P (rwlock)))
+    {
+      /* Increment the reader counter.  Avoid overflow.  */
+      if (__glibc_unlikely (++rwlock->__data.__nr_readers == 0))
+	{
+	  /* Overflow on number of readers.	 */
+	  --rwlock->__data.__nr_readers;
+	  result = EAGAIN;
+	}
+      else
+	LIBC_PROBE (rdlock_acquire_read, 1, rwlock);
+
+      /* We are done, free the lock.  */
+      lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared);
+
+      return result;
+    }
+
+  return __pthread_rwlock_rdlock_slow (rwlock);
+}
+
 weak_alias (__pthread_rwlock_rdlock, pthread_rwlock_rdlock)
 hidden_def (__pthread_rwlock_rdlock)
diff --git a/nptl/pthread_rwlock_wrlock.c b/nptl/pthread_rwlock_wrlock.c
index 1613d45..de54e51 100644
--- a/nptl/pthread_rwlock_wrlock.c
+++ b/nptl/pthread_rwlock_wrlock.c
@@ -25,29 +25,15 @@
 
 
 /* Acquire write lock for RWLOCK.  */
-int
-__pthread_rwlock_wrlock (rwlock)
-     pthread_rwlock_t *rwlock;
+static int __attribute__((noinline))
+__pthread_rwlock_wrlock_slow (pthread_rwlock_t *rwlock)
 {
   int result = 0;
 
-  LIBC_PROBE (wrlock_entry, 1, rwlock);
-
-  /* Make sure we are alone.  */
-  lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
+  /* Caller has taken the lock.  */
 
   while (1)
     {
-      /* Get the rwlock if there is no writer and no reader.  */
-      if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0)
-	{
-	  /* Mark self as writer.  */
-	  rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
-
-	  LIBC_PROBE (wrlock_acquire_write, 1, rwlock);
-	  break;
-	}
-
       /* Make sure we are not holding the rwlock as a writer.  This is
 	 a deadlock situation we recognize and report.  */
       if (__builtin_expect (rwlock->__data.__writer
@@ -80,6 +66,16 @@ __pthread_rwlock_wrlock (rwlock)
 
       /* To start over again, remove the thread from the writer list.  */
       --rwlock->__data.__nr_writers_queued;
+
+      /* Get the rwlock if there is no writer and no reader.  */
+      if (rwlock->__data.__writer == 0 && rwlock->__data.__nr_readers == 0)
+	{
+	  /* Mark self as writer.  */
+	  rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
+
+	  LIBC_PROBE (wrlock_acquire_write, 1, rwlock);
+	  break;
+	}
     }
 
   /* We are done, free the lock.  */
@@ -88,5 +84,34 @@ __pthread_rwlock_wrlock (rwlock)
   return result;
 }
 
+/* Fast path of acquiring write lock for RWLOCK.  */
+
+int
+__pthread_rwlock_wrlock (pthread_rwlock_t *rwlock)
+{
+  LIBC_PROBE (wrlock_entry, 1, rwlock);
+
+  /* Make sure we are alone.  */
+  lll_lock (rwlock->__data.__lock, rwlock->__data.__shared);
+
+  /* Get the rwlock if there is no writer and no reader.  */
+  if (__glibc_likely((rwlock->__data.__writer |
+	rwlock->__data.__nr_readers) == 0))
+    {
+      /* Mark self as writer.  */
+      rwlock->__data.__writer = THREAD_GETMEM (THREAD_SELF, tid);
+
+      LIBC_PROBE (wrlock_acquire_write, 1, rwlock);
+
+      /* We are done, free the lock.  */
+      lll_unlock (rwlock->__data.__lock, rwlock->__data.__shared);
+
+      return 0;
+    }
+
+  return __pthread_rwlock_wrlock_slow (rwlock);
+}
+
+
 weak_alias (__pthread_rwlock_wrlock, pthread_rwlock_wrlock)
 hidden_def (__pthread_rwlock_wrlock)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                          |   78 ++++++
 nptl/pthread_rwlock_rdlock.c                       |   95 +++++--
 nptl/pthread_rwlock_tryrdlock.c                    |    7 +
 nptl/pthread_rwlock_trywrlock.c                    |    7 +
 nptl/pthread_rwlock_unlock.c                       |    6 +
 nptl/pthread_rwlock_wrlock.c                       |   66 ++++--
 .../unix/sysv/linux/s390/bits/pthreadtypes.h       |    2 +
 sysdeps/arm/nptl/bits/pthreadtypes.h               |    2 +
 sysdeps/nptl/pthread.h                             |    6 +-
 sysdeps/sh/nptl/bits/pthreadtypes.h                |    2 +
 sysdeps/sparc/nptl/bits/pthreadtypes.h             |    2 +
 sysdeps/tile/nptl/bits/pthreadtypes.h              |    2 +
 .../sysv/linux/aarch64/nptl/bits/pthreadtypes.h    |    2 +
 sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h  |    2 +
 .../unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h  |    2 +
 .../sysv/linux/i386/i486/pthread_rwlock_rdlock.S   |  192 --------------
 .../linux/i386/i486/pthread_rwlock_timedrdlock.S   |  243 -----------------
 .../linux/i386/i486/pthread_rwlock_timedwrlock.S   |  236 -----------------
 .../sysv/linux/i386/i486/pthread_rwlock_unlock.S   |  151 -----------
 .../sysv/linux/i386/i486/pthread_rwlock_wrlock.S   |  183 -------------
 .../sysv/linux/i386/i586/pthread_rwlock_rdlock.S   |   19 --
 .../linux/i386/i586/pthread_rwlock_timedrdlock.S   |   19 --
 .../linux/i386/i586/pthread_rwlock_timedwrlock.S   |   19 --
 .../sysv/linux/i386/i586/pthread_rwlock_unlock.S   |   19 --
 .../sysv/linux/i386/i586/pthread_rwlock_wrlock.S   |   19 --
 .../sysv/linux/i386/i686/pthread_rwlock_rdlock.S   |   19 --
 .../linux/i386/i686/pthread_rwlock_timedrdlock.S   |   19 --
 .../linux/i386/i686/pthread_rwlock_timedwrlock.S   |   19 --
 .../sysv/linux/i386/i686/pthread_rwlock_unlock.S   |   20 --
 .../sysv/linux/i386/i686/pthread_rwlock_wrlock.S   |   19 --
 .../unix/sysv/linux/ia64/nptl/bits/pthreadtypes.h  |    2 +
 .../unix/sysv/linux/m68k/nptl/bits/pthreadtypes.h  |    2 +
 .../sysv/linux/microblaze/nptl/bits/pthreadtypes.h |    2 +
 .../unix/sysv/linux/mips/nptl/bits/pthreadtypes.h  |    2 +
 .../unix/sysv/linux/powerpc/bits/pthreadtypes.h    |    2 +
 sysdeps/unix/sysv/linux/x86/elision-conf.c         |    2 +
 .../unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S |  177 -------------
 .../sysv/linux/x86_64/pthread_rwlock_timedrdlock.S |  274 --------------------
 .../sysv/linux/x86_64/pthread_rwlock_timedwrlock.S |  266 -------------------
 .../unix/sysv/linux/x86_64/pthread_rwlock_unlock.S |  126 ---------
 .../unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S |  165 ------------
 sysdeps/x86/nptl/bits/pthreadtypes.h               |    7 +-
 sysdeps/x86/nptl/elide.h                           |  109 ++++++++
 43 files changed, 360 insertions(+), 2253 deletions(-)
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
 delete mode 100644 sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S
 create mode 100644 sysdeps/x86/nptl/elide.h


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]