---
name: "futex_lock_pi_atomic"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/futex_lock_pi_atomic"
---

# futex\_lock\_pi\_atomic(9)

Atomic work required to acquire a pi aware futex

## NAME

futex\_lock\_pi\_atomic - Atomic work required to acquire a pi aware futex

## SYNOPSIS

**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***, int** *set\_waiters***);**

## ARGUMENTS

*uaddr*

the pi futex user address

*hb*

the pi futex hash bucket

*key*

the futex key associated with uaddr and hb

*ps*

the pi\_state pointer where we store the result of the lookup

*task*

the task to perform the atomic lock work for. This will be “current” except in the case of requeue pi.

*set\_waiters*

force setting the FUTEX\_WAITERS bit (1) or not (0)

## RETURN

0 - ready to wait; 1 - acquired the lock; \<0 - error

The hb-\>lock and futex\_key refs shall be held by the caller.

## AUTHOR

**Rusty Russell** \<rusty@rustcorp.com.au\>

Author.

## COPYRIGHT
