]> sourceware.org Git - glibc.git/commitdiff
htl: make pthread_spin_lock really spin
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 9 Feb 2020 16:54:58 +0000 (16:54 +0000)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 9 Feb 2020 16:54:58 +0000 (16:54 +0000)
__spin_lock would actually use gsync_wait to block, which is not what
pthread_spin_lock is about.

sysdeps/mach/htl/bits/spin-lock-inline.h

index 771292f08f45b4902874f4370d14f27918c92821..556bdd4c28b17b1be12e8a8de49503df1778ccba 100644 (file)
@@ -67,7 +67,7 @@ __PT_SPIN_INLINE int __pthread_spin_lock (__pthread_spinlock_t *__lock);
 __PT_SPIN_INLINE int
 __pthread_spin_lock (__pthread_spinlock_t *__lock)
 {
-  __spin_lock ((__spin_lock_t *) __lock);
+  __spin_lock_solid ((__spin_lock_t *) __lock);
   return 0;
 }
 
This page took 0.043678 seconds and 5 git commands to generate.