aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-declextract/testdata/io_uring.c
blob: 26ac49790a71bdf772d9a26a3647ca9f5cab15e0 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Copyright 2024 syzkaller project authors. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.

#include "include/uapi/io_uring.h"

struct io_issue_def {
	void (*prep)(void);
	void (*issue)(void);
};

void io_eopnotsupp_prep()
{
}
void io_nop_prep()
{
}
void io_nop()
{
}
void io_readv_prep()
{
}
void io_read()
{
}
void io_writev_prep()
{
}
void io_write()
{
}

const struct io_issue_def ops[] = {
    [IORING_OP_NOP] = {
	.prep = io_nop_prep,
	.issue = io_nop,
    },
    [IORING_OP_READV] = {
	.prep = io_readv_prep,
	.issue = io_read,
    },
    [IORING_OP_WRITEV] = {
	.prep = io_writev_prep,
	.issue = io_write,
    },
    [IORING_OP_NOT_SUPPORTED] = {
	.prep = io_eopnotsupp_prep,
	.issue = io_write,
    },
};