1*49cdfc7eSAndroid Build Coastguard Worker #ifndef _AIO_H 2*49cdfc7eSAndroid Build Coastguard Worker #define _AIO_H 3*49cdfc7eSAndroid Build Coastguard Worker 4*49cdfc7eSAndroid Build Coastguard Worker #include <time.h> 5*49cdfc7eSAndroid Build Coastguard Worker #include <signal.h> 6*49cdfc7eSAndroid Build Coastguard Worker #include <sys/cdefs.h> 7*49cdfc7eSAndroid Build Coastguard Worker #include <sys/types.h> 8*49cdfc7eSAndroid Build Coastguard Worker 9*49cdfc7eSAndroid Build Coastguard Worker __BEGIN_DECLS 10*49cdfc7eSAndroid Build Coastguard Worker 11*49cdfc7eSAndroid Build Coastguard Worker struct aiocb { 12*49cdfc7eSAndroid Build Coastguard Worker int aio_fildes; 13*49cdfc7eSAndroid Build Coastguard Worker off_t aio_offset; 14*49cdfc7eSAndroid Build Coastguard Worker volatile void *aio_buf; 15*49cdfc7eSAndroid Build Coastguard Worker size_t aio_nbytes; 16*49cdfc7eSAndroid Build Coastguard Worker int aio_reqprio; 17*49cdfc7eSAndroid Build Coastguard Worker struct sigevent aio_sigevent; 18*49cdfc7eSAndroid Build Coastguard Worker int aio_lio_opcode; 19*49cdfc7eSAndroid Build Coastguard Worker }; 20*49cdfc7eSAndroid Build Coastguard Worker 21*49cdfc7eSAndroid Build Coastguard Worker enum { 22*49cdfc7eSAndroid Build Coastguard Worker AIO_ALLDONE, 23*49cdfc7eSAndroid Build Coastguard Worker AIO_CANCELED, 24*49cdfc7eSAndroid Build Coastguard Worker AIO_NOTCANCELED, 25*49cdfc7eSAndroid Build Coastguard Worker }; 26*49cdfc7eSAndroid Build Coastguard Worker 27*49cdfc7eSAndroid Build Coastguard Worker enum { 28*49cdfc7eSAndroid Build Coastguard Worker LIO_WAIT, 29*49cdfc7eSAndroid Build Coastguard Worker LIO_NOWAIT, 30*49cdfc7eSAndroid Build Coastguard Worker }; 31*49cdfc7eSAndroid Build Coastguard Worker 32*49cdfc7eSAndroid Build Coastguard Worker enum { 33*49cdfc7eSAndroid Build Coastguard Worker LIO_NOP, 34*49cdfc7eSAndroid Build Coastguard Worker LIO_READ, 35*49cdfc7eSAndroid Build Coastguard Worker LIO_WRITE, 36*49cdfc7eSAndroid Build Coastguard Worker }; 37*49cdfc7eSAndroid Build Coastguard Worker 38*49cdfc7eSAndroid Build Coastguard Worker int aio_read(struct aiocb *); 39*49cdfc7eSAndroid Build Coastguard Worker int aio_write(struct aiocb *); 40*49cdfc7eSAndroid Build Coastguard Worker int aio_fsync(int, struct aiocb *); 41*49cdfc7eSAndroid Build Coastguard Worker int aio_error(const struct aiocb *); 42*49cdfc7eSAndroid Build Coastguard Worker ssize_t aio_return(struct aiocb *); 43*49cdfc7eSAndroid Build Coastguard Worker int aio_suspend(const struct aiocb * const[], int, const struct timespec *); 44*49cdfc7eSAndroid Build Coastguard Worker int aio_cancel(int, struct aiocb *); 45*49cdfc7eSAndroid Build Coastguard Worker int lio_listio(int, struct aiocb *restrict const[restrict], int, 46*49cdfc7eSAndroid Build Coastguard Worker struct sigevent *restrict); 47*49cdfc7eSAndroid Build Coastguard Worker 48*49cdfc7eSAndroid Build Coastguard Worker __END_DECLS 49*49cdfc7eSAndroid Build Coastguard Worker 50*49cdfc7eSAndroid Build Coastguard Worker #endif 51*49cdfc7eSAndroid Build Coastguard Worker 52