summaryrefslogtreecommitdiff
path: root/tests/headers/aio.c
diff options
context:
space:
mode:
authorKacper <kacper@mail.openlinux.dev>2025-12-15 14:42:29 +0100
committerKacper <kacper@mail.openlinux.dev>2025-12-15 14:42:29 +0100
commit7cd3b7caee10d62f7be674afb86a136bf30485d6 (patch)
tree121a8c79114174b765713387187d930b102f760f /tests/headers/aio.c
parent3b3325f761b09ebbfef04c44eed546cc4fdeb329 (diff)
Add mqueue rt api, add header tests
Diffstat (limited to 'tests/headers/aio.c')
-rw-r--r--tests/headers/aio.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/headers/aio.c b/tests/headers/aio.c
new file mode 100644
index 00000000..eabdf4be
--- /dev/null
+++ b/tests/headers/aio.c
@@ -0,0 +1,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));
+}