X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fthread%2Fpthread_spin_lock.c;h=9e43f47539d6dad5661936900ffb20e0c9c36b50;hb=c322fe4e1a9bcc20f7a2ded1ac0e1674ea282bc0;hp=59fa6ea89ad2e322f0071724c7ab09275a4a3258;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=oweals%2Fmusl.git diff --git a/src/thread/pthread_spin_lock.c b/src/thread/pthread_spin_lock.c index 59fa6ea8..9e43f475 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 (*s || a_xchg(s, 1)); return 0; }