Sign in
fuchsia
/
fuchsia
/
96737cabe879221a910ec227e34c2e912550e345
/
.
/
zircon
/
third_party
/
ulib
/
musl
/
pthread
/
pthread_rwlock_trywrlock.c
blob: 0b8ebe8391bd6f6238ba8739d4144438d8295e1f [
file
] [
log
] [
blame
]
#include
"threads_impl.h"
int
pthread_rwlock_trywrlock
(
pthread_rwlock_t
*
rw
)
{
if
(
a_cas_shim
(&
rw
->
_rw_lock
,
PTHREAD_MUTEX_RWLOCK_UNLOCKED
,
PTHREAD_MUTEX_RWLOCK_LOCKED_FOR_WR
))
{
return
EBUSY
;
}
return
0
;
}