blob: 09d595d55812f5aa1dd69bbfc3bc07f7a488b60c [file] [log] [blame]
#include "pthread_impl.h"
#include <errno.h>
int pthread_spin_lock(pthread_spinlock_t* s) {
while (atomic_load(s) || a_cas_shim(s, 0, EBUSY))
a_spin();
return 0;
}