aio.h 651 B

123456789101112131415161718192021222324252627
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __LINUX__AIO_H
  3. #define __LINUX__AIO_H
  4. #include <linux/aio_abi.h>
  5. struct kioctx;
  6. struct kiocb;
  7. struct mm_struct;
  8. typedef int (kiocb_cancel_fn)(struct kiocb *);
  9. /* prototypes */
  10. #ifdef CONFIG_AIO
  11. extern void exit_aio(struct mm_struct *mm);
  12. void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel);
  13. #else
  14. static inline void exit_aio(struct mm_struct *mm) { }
  15. static inline void kiocb_set_cancel_fn(struct kiocb *req,
  16. kiocb_cancel_fn *cancel) { }
  17. #endif /* CONFIG_AIO */
  18. /* for sysctl: */
  19. extern unsigned long aio_nr;
  20. extern unsigned long aio_max_nr;
  21. #endif /* __LINUX__AIO_H */