about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-03-24 23:06:48 -0400
committerRich Felker <dalias@aerifal.cx>2011-03-24 23:06:48 -0400
commitd8dc2faf1033e134e3a8f39bdf15c065f4d234be (patch)
tree26056394c853dd7d76df43fcd692f10aa7bfb673 /src
parentb8b85a42729dc96e43d51848823fbe28ad92b5c0 (diff)
downloadmusl-d8dc2faf1033e134e3a8f39bdf15c065f4d234be.tar.gz
musl-d8dc2faf1033e134e3a8f39bdf15c065f4d234be.tar.xz
musl-d8dc2faf1033e134e3a8f39bdf15c065f4d234be.zip
prepare pthread_spin_unlock for archs that need memory barriers
Diffstat (limited to 'src')
-rw-r--r--src/thread/pthread_spin_unlock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/thread/pthread_spin_unlock.c b/src/thread/pthread_spin_unlock.c
index a7eab334..724d9e0d 100644
--- a/src/thread/pthread_spin_unlock.c
+++ b/src/thread/pthread_spin_unlock.c
@@ -2,5 +2,6 @@
 
 int pthread_spin_unlock(pthread_spinlock_t *s)
 {
-	return *s = 0;
+	a_store(s, 0);
+	return 0;
 }