make [U]INTn_C() macros have the right type...
[musl] / include / aio.h
1 #ifndef _AIO_H
2 #define _AIO_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
9  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
10
11 #include <signal.h>
12 #include <time.h>
13
14 #define __NEED_ssize_t
15 #define __NEED_off_t
16
17 #include <bits/alltypes.h>
18
19 struct aiocb {
20         int aio_fildes, aio_lio_opcode, aio_reqprio;
21         volatile void *aio_buf;
22         size_t aio_nbytes;
23         struct sigevent aio_sigevent;
24         void *__td;
25         int __lock[2];
26         int __err;
27         ssize_t __ret;
28         off_t aio_offset;
29         void *__next, *__prev;
30         char __dummy4[32-2*sizeof(void *)];
31 };
32
33 #define AIO_CANCELED 0
34 #define AIO_NOTCANCELED 1
35 #define AIO_ALLDONE 2
36
37 #define LIO_READ 0
38 #define LIO_WRITE 1
39 #define LIO_NOP 2
40
41 #define LIO_WAIT 0
42 #define LIO_NOWAIT 1
43
44 int aio_read(struct aiocb *);
45 int aio_write(struct aiocb *);
46 int aio_error(const struct aiocb *);
47 ssize_t aio_return(struct aiocb *);
48 int aio_cancel(int, struct aiocb *);
49 int aio_suspend(const struct aiocb *const [], int, const struct timespec *);
50 int aio_fsync(int, struct aiocb *);
51
52 int lio_listio(int, struct aiocb *const [], int, struct sigevent *);
53
54 #endif
55
56 #ifdef __cplusplus
57 }
58 #endif
59
60 #endif