futex(2)
DESCRIPTION
Wait on or wake a shared user word.
FUTEX_WAIT blocks while the word equals value. FUTEX_WAKE wakes up
up to value waiters. The private flag is accepted for ABI shape.
SYNOPSIS
long futex(uint32_t *address, uint32_t operation, uint32_t value, const
timespec *timeout);RETURN VALUE
- Wait returns zero
- wake returns the number of woken waiters.
ERRORS
-EAGAIN- The word no longer equals the expected value.
-EFAULT- The futex word is not accessible userspace memory.
-EINVAL- The operation is unknown.
-ENOSYS- A timeout was requested but timed waits are not implemented.