about summary refs log tree commit diff
path: root/nptl/pthread_spin_unlock.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_spin_unlock.c')
-rw-r--r--nptl/pthread_spin_unlock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nptl/pthread_spin_unlock.c b/nptl/pthread_spin_unlock.c
index 5fd73e578b..f83b69639a 100644
--- a/nptl/pthread_spin_unlock.c
+++ b/nptl/pthread_spin_unlock.c
@@ -23,7 +23,9 @@
 int
 pthread_spin_unlock (pthread_spinlock_t *lock)
 {
-  atomic_full_barrier ();
-  *lock = 0;
+  /* The atomic_store_release synchronizes-with the atomic_exchange_acquire
+     or atomic_compare_exchange_weak_acquire in pthread_spin_lock /
+     pthread_spin_trylock.  */
+  atomic_store_release (lock, 0);
   return 0;
 }