浏览代码

prepare pthread_spin_unlock for archs that need memory barriers

Rich Felker 14 年之前
父节点
当前提交
d8dc2faf10
共有 1 个文件被更改,包括 2 次插入1 次删除
  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;
 }