fix off-by-one error in sem_(timed)wait (using old sem value instead of new)
[musl] / src / thread / pthread_spin_lock.c
1 #include "pthread_impl.h"
2
3 int pthread_spin_lock(pthread_spinlock_t *s)
4 {
5         while (a_xchg(s, 1));
6         return 0;
7 }