Browse Source

prepare pthread_spin_unlock for archs that need memory barriers

Rich Felker 14 năm trước cách đây
mục cha
commit
d8dc2faf10
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/thread/pthread_spin_unlock.c

+ 2 - 1
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;
 }