blob: fdd0a343f45527ee2b5d4a787ad5388a6ce4e47a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __LINUX__AIO_H
2#define __LINUX__AIO_H
3
Linus Torvalds1da177e2005-04-16 15:20:36 -07004#include <linux/aio_abi.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
Linus Torvalds1da177e2005-04-16 15:20:36 -07006struct kioctx;
Kent Overstreet0460fef2013-05-07 16:18:49 -07007struct kiocb;
Christoph Hellwige2e40f22015-02-22 08:58:50 -08008struct mm_struct;
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
Kent Overstreet8a660892013-05-07 16:19:10 -070010#define KIOCB_KEY 0
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Kent Overstreetbec68faa2013-05-13 14:45:08 -070012typedef int (kiocb_cancel_fn)(struct kiocb *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070013
Linus Torvalds1da177e2005-04-16 15:20:36 -070014/* prototypes */
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070015#ifdef CONFIG_AIO
Harvey Harrisonb3c97522008-02-13 15:03:15 -080016extern void exit_aio(struct mm_struct *mm);
Kent Overstreet0460fef2013-05-07 16:18:49 -070017void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel);
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070018#else
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070019static inline void exit_aio(struct mm_struct *mm) { }
Kent Overstreet0460fef2013-05-07 16:18:49 -070020static inline void kiocb_set_cancel_fn(struct kiocb *req,
21 kiocb_cancel_fn *cancel) { }
Thomas Petazzoniebf3f092008-10-15 22:05:12 -070022#endif /* CONFIG_AIO */
Linus Torvalds1da177e2005-04-16 15:20:36 -070023
Linus Torvalds1da177e2005-04-16 15:20:36 -070024/* for sysctl: */
Zach Brownd55b5fd2005-11-07 00:59:31 -080025extern unsigned long aio_nr;
26extern unsigned long aio_max_nr;
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
28#endif /* __LINUX__AIO_H */