1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * Futex2 library addons for futex tests
4  *
5  * Copyright 2021 Collabora Ltd.
6  * Copyright (C) 2021 SUSE LLC Andrea Cervesato <andrea.cervesato@suse.com>
7  */
8 
9 #ifndef FUTEX2TEST_H
10 #define FUTEX2TEST_H
11 
12 #include <stdint.h>
13 #include "lapi/syscalls.h"
14 #include "futextest.h"
15 
16 /**
17  * futex_waitv - Wait at multiple futexes, wake on any
18  * @waiters:    Array of waiters
19  * @nr_waiters: Length of waiters array
20  * @flags: Operation flags
21  * @timo:  Optional timeout for operation
22  */
futex_waitv(volatile struct futex_waitv *waiters, unsigned long nr_waiters, unsigned long flags, struct timespec *timo, clockid_t clockid)23 static inline int futex_waitv(volatile struct futex_waitv *waiters,
24 			      unsigned long nr_waiters, unsigned long flags,
25 			      struct timespec *timo, clockid_t clockid)
26 {
27 	return tst_syscall(__NR_futex_waitv, waiters, nr_waiters, flags, timo, clockid);
28 }
29 
30 #endif /* _FUTEX2TEST_H */
31