FUTEX_REQUEUE(2const)

FUTEX_REQUEUE2const

Wake some waiters, and requeue others

Usage

#include <linux/futex.h>  /* Definition of FUTEX_* constants */
#include <sys/syscall.h>  /* Definition of SYS_* constants */
#include <unistd.h>

long syscall(SYS_futex, uint32_t *uaddr, FUTEX_REQUEUE, uint32_t val, uint32_t val2, uint32_t *uaddr2);

Library

Standard C library (libc, -lc)

Overview

This operation performs the same task as FUTEX_CMP_REQUEUE(2const), except that the futex word isn't compared.

Return value

On error, -1 is returned, and errno is set to indicate the error.

On success, FUTEX_REQUEUE returns the number of waiters that were woken up.

Errors

See futex(2).

EFAULT

uaddr2 did not point to a valid user-space address.

EINVAL

uaddr2 does not point to a valid object—that is, the address is not four-byte-aligned.

EINVAL

The kernel detected an inconsistency between the user-space state at uaddr and the kernel state—that is, it detected a waiter which waits in FUTEX_LOCK_PI(2const) or FUTEX_LOCK_PI2(2const) on uaddr.

Standards

Linux.

History

Linux 2.6.0.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.