summaryrefslogtreecommitdiffstats
path: root/kernel/tests/include/lapi/io_pgetevents.h
blob: 5bb9a60c352a39daff85872cc9a1dccd93706edc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Copyright (c) 2020 Linaro Limited. All rights reserved.
 * Author: Viresh Kumar <viresh.kumar@linaro.org>
 */

#ifndef IO_PGETEVENTS_H
#define IO_PGETEVENTS_H

#include <sys/syscall.h>
#include <sys/types.h>

#include "config.h"
#include "lapi/syscalls.h"

#ifdef HAVE_LIBAIO
#include <libaio.h>

static inline int sys_io_pgetevents(io_context_t ctx, long min_nr, long max_nr,
		struct io_event *events, void *timeout, sigset_t *sigmask)
{
	return tst_syscall(__NR_io_pgetevents, ctx, min_nr, max_nr, events,
			   timeout, sigmask);
}

static inline int sys_io_pgetevents_time64(io_context_t ctx, long min_nr, long max_nr,
		struct io_event *events, void *timeout, sigset_t *sigmask)
{
	return tst_syscall(__NR_io_pgetevents_time64, ctx, min_nr, max_nr,
			   events, timeout, sigmask);
}

#endif /* HAVE_LIBAIO */

#endif /* IO_PGETEVENTS_H */