---
name: "requeue_pi_wake_futex"
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/requeue_pi_wake_futex"
---

# requeue\_pi\_wake\_futex(9)

Wake a task that acquired the lock during requeue

## NAME

requeue\_pi\_wake\_futex - Wake a task that acquired the lock during requeue

## SYNOPSIS

**void requeue\_pi\_wake\_futex(struct futex\_q \*** *q***, union futex\_key \*** *key***, struct futex\_hash\_bucket \*** *hb***);**

## ARGUMENTS

*q*

the futex\_q

*key*

the key of the requeue target futex

*hb*

the hash\_bucket of the requeue target futex

## DESCRIPTION

During futex\_requeue, with requeue\_pi=1, it is possible to acquire the target futex if it is uncontended or via a lock steal. Set the futex\_q key to the requeue target futex so the waiter can detect the wakeup on the right futex, but remove it from the hb and NULL the rt\_waiter so it can detect atomic lock acquisition. Set the q-\>lock\_ptr to the requeue target hb-\>lock to protect access to the pi\_state to fixup the owner later. Must be called with both q-\>lock\_ptr and hb-\>lock held.

## AUTHOR

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

Author.

## COPYRIGHT
