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