FUTEX_PROXY_TRYLOCK_(9) | Futex API reference | FUTEX_PROXY_TRYLOCK_(9) |
NAME¶
futex_proxy_trylock_atomic - Attempt an atomic lock for the top waiter
SYNOPSIS¶
int futex_proxy_trylock_atomic(u32 __user * pifutex, struct futex_hash_bucket * hb1, struct futex_hash_bucket * hb2, union futex_key * key1, union futex_key * key2, struct futex_pi_state ** ps, int set_waiters);
ARGUMENTS¶
pifutex
hb1
hb2
key1
key2
ps
set_waiters
DESCRIPTION¶
Try and get the lock on behalf of the top waiter if we can do it atomically. Wake the top waiter if we succeed. If the caller specified set_waiters, then direct futex_lock_pi_atomic to force setting the FUTEX_WAITERS bit. hb1 and hb2 must be held by the caller.
RETURN¶
0 - failed to acquire the lock atomically; >0 - acquired the lock, return value is vpid of the top_waiter <0 - error
AUTHOR¶
Rusty Russell <rusty@rustcorp.com.au>
COPYRIGHT¶
June 2017 | Kernel Hackers Manual 4.9. |