1
0

aio.h 1023 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #ifndef _AIO_H
  2. #define _AIO_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <signal.h>
  7. #include <time.h>
  8. #define __NEED_ssize_t
  9. #define __NEED_off_t
  10. #include <bits/alltypes.h>
  11. struct aiocb {
  12. int aio_fildes, aio_lio_opcode, aio_reqprio;
  13. volatile void *aio_buf;
  14. size_t aio_nbytes;
  15. struct sigevent aio_sigevent;
  16. void *__td;
  17. int __lock[2];
  18. int __err;
  19. ssize_t __ret;
  20. off_t aio_offset;
  21. void *__next, *__prev;
  22. char __dummy4[32-2*sizeof(void *)];
  23. };
  24. #define AIO_CANCELED 0
  25. #define AIO_NOTCANCELED 1
  26. #define AIO_ALLDONE 2
  27. #define LIO_READ 0
  28. #define LIO_WRITE 1
  29. #define LIO_NOP 2
  30. #define LIO_WAIT 0
  31. #define LIO_NOWAIT 1
  32. int aio_read(struct aiocb *);
  33. int aio_write(struct aiocb *);
  34. int aio_error(const struct aiocb *);
  35. ssize_t aio_return(struct aiocb *);
  36. int aio_cancel(int, struct aiocb *);
  37. int aio_suspend(const struct aiocb *const [], int, const struct timespec *);
  38. int aio_fsync(int, struct aiocb *);
  39. int lio_listio(int, struct aiocb *const [], int, struct sigevent *);
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif