Sign in
fuchsia
/
zircon
/
f3e2126c8a8b2ff64ca6cb7818f0606ceb5f889a
/
.
/
third_party
/
ulib
/
musl
/
pthread
/
pthread_spin_lock.c
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
;
}