X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fthread%2Fpthread_spin_lock.c;h=df575f0858681b76afb8895478778b67e8ca2a7b;hp=59fa6ea89ad2e322f0071724c7ab09275a4a3258;hb=7669d1e334e6b96455eece78da43bf830b93d697;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 diff --git a/src/thread/pthread_spin_lock.c b/src/thread/pthread_spin_lock.c index 59fa6ea8..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)); + while (a_swap(s, 1)) a_spin(); return 0; }