1*49cdfc7eSAndroid Build Coastguard Worker // SPDX-License-Identifier: GPL-2.0-or-later
2*49cdfc7eSAndroid Build Coastguard Worker /*
3*49cdfc7eSAndroid Build Coastguard Worker * Copyright (c) 2020 Linaro Limited. All rights reserved.
4*49cdfc7eSAndroid Build Coastguard Worker * Author: Viresh Kumar <[email protected]>
5*49cdfc7eSAndroid Build Coastguard Worker */
6*49cdfc7eSAndroid Build Coastguard Worker
7*49cdfc7eSAndroid Build Coastguard Worker #ifndef LAPI_IO_PGETEVENTS_H__
8*49cdfc7eSAndroid Build Coastguard Worker #define LAPI_IO_PGETEVENTS_H__
9*49cdfc7eSAndroid Build Coastguard Worker
10*49cdfc7eSAndroid Build Coastguard Worker #include <sys/syscall.h>
11*49cdfc7eSAndroid Build Coastguard Worker #include <sys/types.h>
12*49cdfc7eSAndroid Build Coastguard Worker
13*49cdfc7eSAndroid Build Coastguard Worker #include "config.h"
14*49cdfc7eSAndroid Build Coastguard Worker #include "lapi/syscalls.h"
15*49cdfc7eSAndroid Build Coastguard Worker
16*49cdfc7eSAndroid Build Coastguard Worker #ifdef HAVE_LIBAIO
17*49cdfc7eSAndroid Build Coastguard Worker #include <libaio.h>
18*49cdfc7eSAndroid Build Coastguard Worker
sys_io_pgetevents(io_context_t ctx,long min_nr,long max_nr,struct io_event * events,void * timeout,sigset_t * sigmask)19*49cdfc7eSAndroid Build Coastguard Worker static inline int sys_io_pgetevents(io_context_t ctx, long min_nr, long max_nr,
20*49cdfc7eSAndroid Build Coastguard Worker struct io_event *events, void *timeout, sigset_t *sigmask)
21*49cdfc7eSAndroid Build Coastguard Worker {
22*49cdfc7eSAndroid Build Coastguard Worker return tst_syscall(__NR_io_pgetevents, ctx, min_nr, max_nr, events,
23*49cdfc7eSAndroid Build Coastguard Worker timeout, sigmask);
24*49cdfc7eSAndroid Build Coastguard Worker }
25*49cdfc7eSAndroid Build Coastguard Worker
sys_io_pgetevents_time64(io_context_t ctx,long min_nr,long max_nr,struct io_event * events,void * timeout,sigset_t * sigmask)26*49cdfc7eSAndroid Build Coastguard Worker static inline int sys_io_pgetevents_time64(io_context_t ctx, long min_nr, long max_nr,
27*49cdfc7eSAndroid Build Coastguard Worker struct io_event *events, void *timeout, sigset_t *sigmask)
28*49cdfc7eSAndroid Build Coastguard Worker {
29*49cdfc7eSAndroid Build Coastguard Worker return tst_syscall(__NR_io_pgetevents_time64, ctx, min_nr, max_nr,
30*49cdfc7eSAndroid Build Coastguard Worker events, timeout, sigmask);
31*49cdfc7eSAndroid Build Coastguard Worker }
32*49cdfc7eSAndroid Build Coastguard Worker
33*49cdfc7eSAndroid Build Coastguard Worker #endif /* HAVE_LIBAIO */
34*49cdfc7eSAndroid Build Coastguard Worker
35*49cdfc7eSAndroid Build Coastguard Worker #endif /* LAPI_IO_PGETEVENTS_H__ */
36