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