commit f9a5437b0c0150bac4c5afd769dd6eba09fed1de
Author: Torvald Riegel <triegel@redhat.com>
Date:   Mon Feb 1 12:35:50 2016 +0100

    generic spinlock cleanup and x86_64 customization removal.

diff --git a/nptl/pthread_spin_lock.c b/nptl/pthread_spin_lock.c
index fb9bcc1..2209341 100644
--- a/nptl/pthread_spin_lock.c
+++ b/nptl/pthread_spin_lock.c
@@ -38,7 +38,7 @@ pthread_spin_lock (pthread_spinlock_t *lock)
      We assume that the first try mostly will be successful, and we use
      atomic_exchange.  For the subsequent tries we use
      atomic_compare_and_exchange.  */
-  if (atomic_exchange_acq (lock, 1) == 0)
+  if (__glibc_likely (atomic_exchange_acq (lock, 1) == 0))
     return 0;
 
   do
diff --git a/nptl/pthread_spin_unlock.c b/nptl/pthread_spin_unlock.c
index d4b63ac..ca534a0 100644
--- a/nptl/pthread_spin_unlock.c
+++ b/nptl/pthread_spin_unlock.c
@@ -23,7 +23,6 @@
 int
 pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-  atomic_full_barrier ();
-  *lock = 0;
+  atomic_store_release (lock, 0);
   return 0;
 }
diff --git a/sysdeps/x86_64/nptl/pthread_spin_init.c b/sysdeps/x86_64/nptl/pthread_spin_init.c
deleted file mode 100644
index f249c6f..0000000
--- a/sysdeps/x86_64/nptl/pthread_spin_init.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/i386/nptl/pthread_spin_init.c>
diff --git a/sysdeps/x86_64/nptl/pthread_spin_lock.S b/sysdeps/x86_64/nptl/pthread_spin_lock.S
deleted file mode 100644
index b871241..0000000
--- a/sysdeps/x86_64/nptl/pthread_spin_lock.S
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright (C) 2012-2016 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/>.  */
-
-#include <lowlevellock.h>
-#include <sysdep.h>
-
-ENTRY(pthread_spin_lock)
-1:	LOCK
-	decl	0(%rdi)
-	jne	2f
-	xor	%eax, %eax
-	ret
-
-	.align	16
-2:	rep
-	nop
-	cmpl	$0, 0(%rdi)
-	jg	1b
-	jmp	2b
-END(pthread_spin_lock)
diff --git a/sysdeps/x86_64/nptl/pthread_spin_trylock.S b/sysdeps/x86_64/nptl/pthread_spin_trylock.S
deleted file mode 100644
index c9c5317..0000000
--- a/sysdeps/x86_64/nptl/pthread_spin_trylock.S
+++ /dev/null
@@ -1,37 +0,0 @@
-/* Copyright (C) 2002-2016 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 <pthread-errnos.h>
-#include <sysdep.h>
-
-
-#ifdef UP
-# define LOCK
-#else
-# define LOCK lock
-#endif
-
-ENTRY(pthread_spin_trylock)
-	movl	$1, %eax
-	xorl	%ecx, %ecx
-	LOCK
-	cmpxchgl %ecx, (%rdi)
-	movl	$EBUSY, %eax
-	cmovel	%ecx, %eax
-	retq
-END(pthread_spin_trylock)
diff --git a/sysdeps/x86_64/nptl/pthread_spin_unlock.S b/sysdeps/x86_64/nptl/pthread_spin_unlock.S
deleted file mode 100644
index 188de2e..0000000
--- a/sysdeps/x86_64/nptl/pthread_spin_unlock.S
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright (C) 2002-2016 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>
-
-ENTRY(pthread_spin_unlock)
-	movl	$1, (%rdi)
-	xorl	%eax, %eax
-	retq
-END(pthread_spin_unlock)
-
-	/* The implementation of pthread_spin_init is identical.  */
-	.globl	pthread_spin_init
-pthread_spin_init = pthread_spin_unlock
