requeue_pi_wake_futex(9)

requeue_pi_wake_futex9

Wake a task that acquired the lock during requeue

Usage

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

Overview

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.

Releases

2 releases since Debian 8 (Jessie); the text changed 1 time.

  1. 8
  2. 9

Author

Rusty Russell <[email protected]>

Author.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.