Commit | Line | Data |
---|---|---|
1da177e4 LT |
1 | #ifndef __LINUX__AIO_H |
2 | #define __LINUX__AIO_H | |
3 | ||
1da177e4 | 4 | #include <linux/aio_abi.h> |
1da177e4 | 5 | |
1da177e4 | 6 | struct kioctx; |
0460fef2 | 7 | struct kiocb; |
e2e40f2c | 8 | struct mm_struct; |
1da177e4 | 9 | |
8a660890 | 10 | #define KIOCB_KEY 0 |
1da177e4 | 11 | |
bec68faa | 12 | typedef int (kiocb_cancel_fn)(struct kiocb *); |
1da177e4 | 13 | |
1da177e4 | 14 | /* prototypes */ |
ebf3f09c | 15 | #ifdef CONFIG_AIO |
b3c97528 | 16 | extern void exit_aio(struct mm_struct *mm); |
9d85cba7 JM |
17 | extern long do_io_submit(aio_context_t ctx_id, long nr, |
18 | struct iocb __user *__user *iocbpp, bool compat); | |
0460fef2 | 19 | void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel); |
ebf3f09c | 20 | #else |
ebf3f09c | 21 | static inline void exit_aio(struct mm_struct *mm) { } |
9d85cba7 JM |
22 | static inline long do_io_submit(aio_context_t ctx_id, long nr, |
23 | struct iocb __user * __user *iocbpp, | |
24 | bool compat) { return 0; } | |
0460fef2 KO |
25 | static inline void kiocb_set_cancel_fn(struct kiocb *req, |
26 | kiocb_cancel_fn *cancel) { } | |
ebf3f09c | 27 | #endif /* CONFIG_AIO */ |
1da177e4 | 28 | |
1da177e4 | 29 | /* for sysctl: */ |
d55b5fda ZB |
30 | extern unsigned long aio_nr; |
31 | extern unsigned long aio_max_nr; | |
1da177e4 LT |
32 | |
33 | #endif /* __LINUX__AIO_H */ |