about summary refs log tree commit diff
path: root/src/thread/pthread_spin_lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/pthread_spin_lock.c')
-rw-r--r--src/thread/pthread_spin_lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/thread/pthread_spin_lock.c b/src/thread/pthread_spin_lock.c
index 0ab3d64f..df575f08 100644
--- a/src/thread/pthread_spin_lock.c
+++ b/src/thread/pthread_spin_lock.c
@@ -2,6 +2,6 @@
 
 int pthread_spin_lock(pthread_spinlock_t *s)
 {
-	while (a_xchg(s, 1)) a_spin();
+	while (a_swap(s, 1)) a_spin();
 	return 0;
 }