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