'\" t .\" Title: requeue_pi_wake_futex .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Futex API reference .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "REQUEUE_PI_WAKE_FUTE" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Futex API reference" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" requeue_pi_wake_futex \- Wake a task that acquired the lock during requeue .SH "SYNOPSIS" .HP \w'void\ requeue_pi_wake_futex('u .BI "void requeue_pi_wake_futex(struct\ futex_q\ *\ " "q" ", union\ futex_key\ *\ " "key" ", struct\ futex_hash_bucket\ *\ " "hb" ");" .SH "ARGUMENTS" .PP \fIq\fR .RS 4 the futex_q .RE .PP \fIkey\fR .RS 4 the key of the requeue target futex .RE .PP \fIhb\fR .RS 4 the hash_bucket of the requeue target futex .RE .SH "DESCRIPTION" .PP 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\&. .SH "AUTHOR" .PP \fBRusty Russell\fR <\&rusty@rustcorp.com.au\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br