blob: 23c8334b0d06bc6ce8a77c98aa03bec665176340 [file] [log] [blame]
#include <errno.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;
}