about summary refs log tree commit diff
diff options
context:
space:
mode:
-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;
 }