1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * Copyright (c) 2020 Linaro Limited. All rights reserved.
4 * Author: Viresh Kumar <viresh.kumar@linaro.org>
5 */
6
7 #ifndef IO_PGETEVENTS_H
8 #define IO_PGETEVENTS_H
9
10 #include <sys/syscall.h>
11 #include <sys/types.h>
12
13 #include "config.h"
14 #include "lapi/syscalls.h"
15
16 #ifdef HAVE_LIBAIO
17 #include <libaio.h>
18
19 #ifndef HAVE_IO_PGETEVENTS
io_pgetevents(io_context_t ctx,long min_nr,long max_nr,struct io_event * events,struct timespec * timeout,sigset_t * sigmask)20 int io_pgetevents(io_context_t ctx, long min_nr, long max_nr,
21 struct io_event *events, struct timespec *timeout,
22 sigset_t *sigmask)
23 {
24 return tst_syscall(__NR_io_pgetevents, ctx, min_nr, max_nr, events,
25 timeout, sigmask);
26 }
27 #endif /* HAVE_IO_PGETEVENTS */
28 #endif /* HAVE_LIBAIO */
29
30 #endif /* IO_PGETEVENTS_H */
31