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

# handle\_early\_requeue\_pi\_wakeup(9)

Detect early wakeup on the initial futex

## NAME

handle\_early\_requeue\_pi\_wakeup - Detect early wakeup on the initial futex

## SYNOPSIS

**int handle\_early\_requeue\_pi\_wakeup(struct futex\_hash\_bucket \*** *hb***, struct futex\_q \*** *q***, union futex\_key \*** *key2***, struct hrtimer\_sleeper \*** *timeout***);**

## ARGUMENTS

*hb*

the hash\_bucket futex\_q was original enqueued on

*q*

the futex\_q woken while waiting to be requeued

*key2*

the futex\_key of the requeue target futex

*timeout*

the timeout associated with the wait (NULL if none)

## DESCRIPTION

Detect if the task was woken on the initial futex as opposed to the requeue target futex. If so, determine if it was a timeout or a signal that caused the wakeup and return the appropriate error code to the caller. Must be called with the hb lock held.

## RETURN

0 = no early wakeup detected; \<0 = -ETIMEDOUT or -ERESTARTNOINTR

## AUTHOR

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

Author.

## COPYRIGHT
