diff options
Diffstat (limited to 'include/linux/aio.h')
| -rw-r--r-- | include/linux/aio.h | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index 5c40b61285ac..9eb42dbc5582 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
| @@ -1,52 +1,23 @@ | |||
| 1 | #ifndef __LINUX__AIO_H | 1 | #ifndef __LINUX__AIO_H |
| 2 | #define __LINUX__AIO_H | 2 | #define __LINUX__AIO_H |
| 3 | 3 | ||
| 4 | #include <linux/list.h> | ||
| 5 | #include <linux/workqueue.h> | ||
| 6 | #include <linux/aio_abi.h> | 4 | #include <linux/aio_abi.h> |
| 7 | #include <linux/uio.h> | ||
| 8 | #include <linux/rcupdate.h> | ||
| 9 | |||
| 10 | #include <linux/atomic.h> | ||
| 11 | 5 | ||
| 12 | struct kioctx; | 6 | struct kioctx; |
| 13 | struct kiocb; | 7 | struct kiocb; |
| 8 | struct mm_struct; | ||
| 14 | 9 | ||
| 15 | #define KIOCB_KEY 0 | 10 | #define KIOCB_KEY 0 |
| 16 | 11 | ||
| 17 | typedef int (kiocb_cancel_fn)(struct kiocb *); | 12 | typedef int (kiocb_cancel_fn)(struct kiocb *); |
| 18 | 13 | ||
| 19 | #define IOCB_EVENTFD (1 << 0) | ||
| 20 | |||
| 21 | struct kiocb { | ||
| 22 | struct file *ki_filp; | ||
| 23 | loff_t ki_pos; | ||
| 24 | void (*ki_complete)(struct kiocb *iocb, long ret, long ret2); | ||
| 25 | void *private; | ||
| 26 | int ki_flags; | ||
| 27 | }; | ||
| 28 | |||
| 29 | static inline bool is_sync_kiocb(struct kiocb *kiocb) | ||
| 30 | { | ||
| 31 | return kiocb->ki_complete == NULL; | ||
| 32 | } | ||
| 33 | |||
| 34 | static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp) | ||
| 35 | { | ||
| 36 | *kiocb = (struct kiocb) { | ||
| 37 | .ki_filp = filp, | ||
| 38 | }; | ||
| 39 | } | ||
| 40 | |||
| 41 | /* prototypes */ | 14 | /* prototypes */ |
| 42 | #ifdef CONFIG_AIO | 15 | #ifdef CONFIG_AIO |
| 43 | struct mm_struct; | ||
| 44 | extern void exit_aio(struct mm_struct *mm); | 16 | extern void exit_aio(struct mm_struct *mm); |
| 45 | extern long do_io_submit(aio_context_t ctx_id, long nr, | 17 | extern long do_io_submit(aio_context_t ctx_id, long nr, |
| 46 | struct iocb __user *__user *iocbpp, bool compat); | 18 | struct iocb __user *__user *iocbpp, bool compat); |
| 47 | void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel); | 19 | void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel); |
| 48 | #else | 20 | #else |
| 49 | struct mm_struct; | ||
| 50 | static inline void exit_aio(struct mm_struct *mm) { } | 21 | static inline void exit_aio(struct mm_struct *mm) { } |
| 51 | static inline long do_io_submit(aio_context_t ctx_id, long nr, | 22 | static inline long do_io_submit(aio_context_t ctx_id, long nr, |
| 52 | struct iocb __user * __user *iocbpp, | 23 | struct iocb __user * __user *iocbpp, |
