summaryrefslogtreecommitdiff
path: root/tests/headers/aio.c
blob: eabdf4be5d81b9e2cd05114db0e8e340ab70e86d (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
// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/aio.h.html

#include "core.h"

#include <aio.h>

TEST(aio_h)
{
	MACRO_VALUE(AIO_CANCELED, 0);
	MACRO_VALUE(AIO_NOTCANCELED, 1);
	MACRO_VALUE(AIO_ALLDONE, 2);

	MACRO_VALUE(LIO_READ, 0);
	MACRO_VALUE(LIO_WRITE, 1);
	MACRO_VALUE(LIO_NOP, 2);

	MACRO_VALUE(LIO_WAIT, 0);
	MACRO_VALUE(LIO_NOWAIT, 1);

	TYPE(off_t);
	TYPE(size_t);
	TYPE(ssize_t);
	TYPE(struct aiocb);
	TYPE(struct sigevent);
	TYPE(struct timespec);

	FUNCTION(aio_cancel, int (*_)(int, struct aiocb *));
	FUNCTION(aio_error, int (*_)(const struct aiocb *));
	FUNCTION(aio_fsync, int (*_)(int, struct aiocb *));
	FUNCTION(aio_read, int (*_)(struct aiocb *));
	FUNCTION(aio_return, ssize_t(*_)(struct aiocb *));
	FUNCTION(aio_suspend, int (*_)(const struct aiocb *const[], int,
				       const struct timespec *));
	FUNCTION(lio_listio, int (*_)(int, struct aiocb *restrict const[], int,
				      struct sigevent *restrict));
}