prepare pthread_spin_unlock for archs that need memory barriers
authorRich Felker <dalias@aerifal.cx>
Fri, 25 Mar 2011 03:06:48 +0000 (23:06 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 25 Mar 2011 03:06:48 +0000 (23:06 -0400)
src/thread/pthread_spin_unlock.c

index a7eab33..724d9e0 100644 (file)
@@ -2,5 +2,6 @@
 
 int pthread_spin_unlock(pthread_spinlock_t *s)
 {
 
 int pthread_spin_unlock(pthread_spinlock_t *s)
 {
-       return *s = 0;
+       a_store(s, 0);
+       return 0;
 }
 }