| 1 |
.\" Copyright, the authors of the Linux man-pages project |
| 2 |
.\" |
| 3 |
.\" %%%LICENSE_START(FREELY_REDISTRIBUTABLE) |
| 4 |
.\" may be freely modified and distributed |
| 5 |
.\" %%%LICENSE_END |
| 6 |
.\" |
| 7 |
.TH FUTEX_REQUEUE 2const 2025-05-30 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
FUTEX_REQUEUE \- wake some waiters, and requeue others |
| 10 |
.SH LIBRARY |
| 11 |
Standard C library |
| 12 |
.RI ( libc ,\~ \-lc ) |
| 13 |
.SH SYNOPSIS |
| 14 |
.nf |
| 15 |
.BR "#include <linux/futex.h>" " /* Definition of " FUTEX_* " constants */" |
| 16 |
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" |
| 17 |
.B #include <unistd.h> |
| 18 |
.P |
| 19 |
.BI "long syscall(SYS_futex, uint32_t *" uaddr ", FUTEX_REQUEUE," |
| 20 |
.BI " uint32_t " val ", uint32_t " val2 ", uint32_t *" uaddr2 ); |
| 21 |
.fi |
| 22 |
.SH DESCRIPTION |
| 23 |
This operation performs the same task as |
| 24 |
.BR FUTEX_CMP_REQUEUE (2const), |
| 25 |
except that the futex word isn't compared. |
| 26 |
.\" |
| 27 |
.SH RETURN VALUE |
| 28 |
On error, |
| 29 |
\-1 is returned, |
| 30 |
and |
| 31 |
.I errno |
| 32 |
is set to indicate the error. |
| 33 |
.P |
| 34 |
On success, |
| 35 |
.B FUTEX_REQUEUE |
| 36 |
returns the number of waiters that were woken up. |
| 37 |
.SH ERRORS |
| 38 |
See |
| 39 |
.BR futex (2). |
| 40 |
.TP |
| 41 |
.B EFAULT |
| 42 |
.I uaddr2 |
| 43 |
did not point to a valid user-space address. |
| 44 |
.TP |
| 45 |
.B EINVAL |
| 46 |
.I uaddr2 |
| 47 |
does not point to a valid object\[em]that is, |
| 48 |
the address is not four-byte-aligned. |
| 49 |
.TP |
| 50 |
.B EINVAL |
| 51 |
The kernel detected an inconsistency between the user-space state at |
| 52 |
.I uaddr |
| 53 |
and the kernel state\[em]that is, it detected a waiter which waits in |
| 54 |
.BR FUTEX_LOCK_PI (2const) |
| 55 |
or |
| 56 |
.BR FUTEX_LOCK_PI2 (2const) |
| 57 |
on |
| 58 |
.IR uaddr . |
| 59 |
.SH STANDARDS |
| 60 |
Linux. |
| 61 |
.SH HISTORY |
| 62 |
Linux 2.6.0. |
| 63 |
.SH SEE ALSO |
| 64 |
.BR futex (2) |