FUTEX_WAKE(2const) | FUTEX_WAKE(2const) |
NAME
FUTEX_WAKE - wake waiters that are inside FUTEX_WAIT
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#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_WAKE, uint32_t val);
DESCRIPTION
This operation wakes at most val of the waiters that are waiting (e.g., inside FUTEX_WAIT(2const)) on the futex word at the address uaddr.
Most commonly, val is specified as either 1 (wake up a single waiter) or INT_MAX (wake up all waiters).
No guarantee is provided about which waiters are awoken (e.g., a waiter with a higher scheduling priority is not guaranteed to be awoken in preference to a waiter with a lower priority).
RETURN VALUE
On error, -1 is returned, and errno is set to indicate the error.
On success, FUTEX_WAKE returns the number of waiters that were woken up.
ERRORS
See futex(2).
- 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.
SEE ALSO
2025-05-30 | Linux man-pages 6.15 |