1*cda5da8dSAndroid Build Coastguard Worker #ifndef _AIO_H 2*cda5da8dSAndroid Build Coastguard Worker #define _AIO_H 3*cda5da8dSAndroid Build Coastguard Worker 4*cda5da8dSAndroid Build Coastguard Worker #ifdef __cplusplus 5*cda5da8dSAndroid Build Coastguard Worker extern "C" { 6*cda5da8dSAndroid Build Coastguard Worker #endif 7*cda5da8dSAndroid Build Coastguard Worker 8*cda5da8dSAndroid Build Coastguard Worker #include <features.h> 9*cda5da8dSAndroid Build Coastguard Worker #include <signal.h> 10*cda5da8dSAndroid Build Coastguard Worker #include <time.h> 11*cda5da8dSAndroid Build Coastguard Worker 12*cda5da8dSAndroid Build Coastguard Worker #define __NEED_ssize_t 13*cda5da8dSAndroid Build Coastguard Worker #define __NEED_off_t 14*cda5da8dSAndroid Build Coastguard Worker 15*cda5da8dSAndroid Build Coastguard Worker #include <bits/alltypes.h> 16*cda5da8dSAndroid Build Coastguard Worker 17*cda5da8dSAndroid Build Coastguard Worker struct aiocb { 18*cda5da8dSAndroid Build Coastguard Worker int aio_fildes, aio_lio_opcode, aio_reqprio; 19*cda5da8dSAndroid Build Coastguard Worker volatile void *aio_buf; 20*cda5da8dSAndroid Build Coastguard Worker size_t aio_nbytes; 21*cda5da8dSAndroid Build Coastguard Worker struct sigevent aio_sigevent; 22*cda5da8dSAndroid Build Coastguard Worker void *__td; 23*cda5da8dSAndroid Build Coastguard Worker int __lock[2]; 24*cda5da8dSAndroid Build Coastguard Worker volatile int __err; 25*cda5da8dSAndroid Build Coastguard Worker ssize_t __ret; 26*cda5da8dSAndroid Build Coastguard Worker off_t aio_offset; 27*cda5da8dSAndroid Build Coastguard Worker void *__next, *__prev; 28*cda5da8dSAndroid Build Coastguard Worker char __dummy4[32-2*sizeof(void *)]; 29*cda5da8dSAndroid Build Coastguard Worker }; 30*cda5da8dSAndroid Build Coastguard Worker 31*cda5da8dSAndroid Build Coastguard Worker #define AIO_CANCELED 0 32*cda5da8dSAndroid Build Coastguard Worker #define AIO_NOTCANCELED 1 33*cda5da8dSAndroid Build Coastguard Worker #define AIO_ALLDONE 2 34*cda5da8dSAndroid Build Coastguard Worker 35*cda5da8dSAndroid Build Coastguard Worker #define LIO_READ 0 36*cda5da8dSAndroid Build Coastguard Worker #define LIO_WRITE 1 37*cda5da8dSAndroid Build Coastguard Worker #define LIO_NOP 2 38*cda5da8dSAndroid Build Coastguard Worker 39*cda5da8dSAndroid Build Coastguard Worker #define LIO_WAIT 0 40*cda5da8dSAndroid Build Coastguard Worker #define LIO_NOWAIT 1 41*cda5da8dSAndroid Build Coastguard Worker 42*cda5da8dSAndroid Build Coastguard Worker int aio_read(struct aiocb *); 43*cda5da8dSAndroid Build Coastguard Worker int aio_write(struct aiocb *); 44*cda5da8dSAndroid Build Coastguard Worker int aio_error(const struct aiocb *); 45*cda5da8dSAndroid Build Coastguard Worker ssize_t aio_return(struct aiocb *); 46*cda5da8dSAndroid Build Coastguard Worker int aio_cancel(int, struct aiocb *); 47*cda5da8dSAndroid Build Coastguard Worker int aio_suspend(const struct aiocb *const [], int, const struct timespec *); 48*cda5da8dSAndroid Build Coastguard Worker int aio_fsync(int, struct aiocb *); 49*cda5da8dSAndroid Build Coastguard Worker 50*cda5da8dSAndroid Build Coastguard Worker int lio_listio(int, struct aiocb *__restrict const *__restrict, int, struct sigevent *__restrict); 51*cda5da8dSAndroid Build Coastguard Worker 52*cda5da8dSAndroid Build Coastguard Worker #if defined(_LARGEFILE64_SOURCE) 53*cda5da8dSAndroid Build Coastguard Worker #define aiocb64 aiocb 54*cda5da8dSAndroid Build Coastguard Worker #define aio_read64 aio_read 55*cda5da8dSAndroid Build Coastguard Worker #define aio_write64 aio_write 56*cda5da8dSAndroid Build Coastguard Worker #define aio_error64 aio_error 57*cda5da8dSAndroid Build Coastguard Worker #define aio_return64 aio_return 58*cda5da8dSAndroid Build Coastguard Worker #define aio_cancel64 aio_cancel 59*cda5da8dSAndroid Build Coastguard Worker #define aio_suspend64 aio_suspend 60*cda5da8dSAndroid Build Coastguard Worker #define aio_fsync64 aio_fsync 61*cda5da8dSAndroid Build Coastguard Worker #define lio_listio64 lio_listio 62*cda5da8dSAndroid Build Coastguard Worker #define off64_t off_t 63*cda5da8dSAndroid Build Coastguard Worker #endif 64*cda5da8dSAndroid Build Coastguard Worker 65*cda5da8dSAndroid Build Coastguard Worker #if _REDIR_TIME64 66*cda5da8dSAndroid Build Coastguard Worker __REDIR(aio_suspend, __aio_suspend_time64); 67*cda5da8dSAndroid Build Coastguard Worker #endif 68*cda5da8dSAndroid Build Coastguard Worker 69*cda5da8dSAndroid Build Coastguard Worker #ifdef __cplusplus 70*cda5da8dSAndroid Build Coastguard Worker } 71*cda5da8dSAndroid Build Coastguard Worker #endif 72*cda5da8dSAndroid Build Coastguard Worker 73*cda5da8dSAndroid Build Coastguard Worker #endif 74