futex_lock_pi_atomic — Atomic work required to acquire a pi aware futex
int futex_lock_pi_atomic ( | u32 __user * uaddr, |
| struct futex_hash_bucket * hb, | |
| union futex_key * key, | |
| struct futex_pi_state ** ps, | |
| struct task_struct * task, | |
| struct task_struct ** exiting, | |
int set_waiters); |
uaddrthe pi futex user address
hbthe pi futex hash bucket
keythe futex key associated with uaddr and hb
psthe pi_state pointer where we store the result of the lookup
taskthe task to perform the atomic lock work for. This will be “current” except in the case of requeue pi.
exitingPointer to store the task pointer of the owner task which is in the middle of exiting
set_waitersforce setting the FUTEX_WAITERS bit (1) or not (0)
0 - ready to wait; 1 - acquired the lock; <0 - error
The hb->lock and futex_key refs shall be held by the caller.
exiting is only set when the return value is -EBUSY. If so, this holds
a refcount on the exiting task on return and the caller needs to drop it
after waiting for the exit to complete.