Sign in
fuchsia
/
fuchsia
/
419b51fe8a82d81b63b0e67951ec6e224c2194f7
/
.
/
zircon
/
third_party
/
ulib
/
musl
/
pthread
/
pthread_spin_lock.c
blob: bef30be2328ef586e0a903ac446fd52c6fe6da57 [
file
] [
log
] [
blame
]
#include
"threads_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
;
}