linux-stable/include/uapi/asm-generic
André Almeida bf69bad38c futex: Implement sys_futex_waitv()
Add support to wait on multiple futexes. This is the interface
implemented by this syscall:

futex_waitv(struct futex_waitv *waiters, unsigned int nr_futexes,
	    unsigned int flags, struct timespec *timeout, clockid_t clockid)

struct futex_waitv {
	__u64 val;
	__u64 uaddr;
	__u32 flags;
	__u32 __reserved;
};

Given an array of struct futex_waitv, wait on each uaddr. The thread
wakes if a futex_wake() is performed at any uaddr. The syscall returns
immediately if any waiter has *uaddr != val. *timeout is an optional
absolute timeout value for the operation. This syscall supports only
64bit sized timeout structs. The flags argument of the syscall should be
empty, but it can be used for future extensions. Flags for shared
futexes, sizes, etc. should be used on the individual flags of each
waiter.

__reserved is used for explicit padding and should be 0, but it might be
used for future extensions. If the userspace uses 32-bit pointers, it
should make sure to explicitly cast it when assigning to waitv::uaddr.

Returns the array index of one of the woken futexes. There’s no given
information of how many were woken, or any particular attribute of it
(if it’s the first woken, if it is of the smaller index...).

Signed-off-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210923171111.300673-17-andrealmeid@collabora.com
2021-10-07 13:51:11 +02:00
..
auxvec.h
bitsperlong.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
bpf_perf_event.h bpf: correct broken uapi for BPF_PROG_TYPE_PERF_EVENT program type 2017-12-05 15:02:40 +01:00
errno-base.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
errno.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
fcntl.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
hugetlb_encode.h powerpc/8xx: Support 16k hugepages with 4k pages 2020-09-15 22:13:31 +10:00
int-l64.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
int-ll64.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
ioctl.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
ioctls.h tty/serial_core: add ISO7816 infrastructure 2018-10-02 13:38:55 -07:00
ipcbuf.h arch: ipcbuf.h: make uapi asm/ipcbuf.h self-contained 2019-12-04 19:44:14 -08:00
Kbuild kbuild: force all architectures except um to include mandatory-y 2019-03-17 12:56:32 +09:00
kvm_para.h
mman-common.h mm/madvise: introduce MADV_POPULATE_(READ|WRITE) to prefault page tables 2021-06-30 20:47:30 -07:00
mman.h mm/mmap: move common defines to mman-common.h 2019-07-16 19:23:25 -07:00
msgbuf.h arch: msgbuf.h: make uapi asm/msgbuf.h self-contained 2019-12-04 19:44:14 -08:00
param.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
poll.h unify {de,}mangle_poll(), get rid of kernel-side POLL... 2018-02-11 14:37:22 -08:00
posix_types.h y2038: hide timeval/timespec/itimerval/itimerspec types 2020-02-21 11:22:15 -08:00
resource.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
sembuf.h asm-generic/sembuf: Update architecture related information in comment 2020-10-26 16:48:22 +01:00
setup.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
shmbuf.h y2038: ipc: remove __kernel_time_t reference from headers 2019-11-15 14:38:28 +01:00
siginfo.h signal: Verify the alignment and size of siginfo_t 2021-07-23 13:15:31 -05:00
signal-defs.h signal: define the SA_EXPOSE_TAGBITS bit in sa_flags 2020-11-23 10:31:06 -06:00
signal.h arch: move SA_* definitions to generic headers 2020-11-23 10:31:05 -06:00
socket.h sock: allow reading and changing sk_userlocks with setsockopt 2021-08-04 12:52:03 +01:00
sockios.h net: socket: implement 64-bit timestamps 2019-04-19 14:07:40 -07:00
stat.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
statfs.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
swab.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
termbits.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
termios.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
types.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
ucontext.h License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
unistd.h futex: Implement sys_futex_waitv() 2021-10-07 13:51:11 +02:00