2005-04-16 22:20:36 +00:00
|
|
|
#ifndef __LINUX__AIO_H
|
|
|
|
#define __LINUX__AIO_H
|
|
|
|
|
|
|
|
#include <linux/aio_abi.h>
|
|
|
|
|
|
|
|
struct kioctx;
|
2013-05-07 23:18:49 +00:00
|
|
|
struct kiocb;
|
2015-02-22 16:58:50 +00:00
|
|
|
struct mm_struct;
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2013-05-07 23:19:10 +00:00
|
|
|
#define KIOCB_KEY 0
|
2005-04-16 22:20:36 +00:00
|
|
|
|
2013-05-13 21:45:08 +00:00
|
|
|
typedef int (kiocb_cancel_fn)(struct kiocb *);
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/* prototypes */
|
2008-10-16 05:05:12 +00:00
|
|
|
#ifdef CONFIG_AIO
|
2008-02-13 23:03:15 +00:00
|
|
|
extern void exit_aio(struct mm_struct *mm);
|
2010-05-26 21:44:26 +00:00
|
|
|
extern long do_io_submit(aio_context_t ctx_id, long nr,
|
|
|
|
struct iocb __user *__user *iocbpp, bool compat);
|
2013-05-07 23:18:49 +00:00
|
|
|
void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel);
|
2008-10-16 05:05:12 +00:00
|
|
|
#else
|
|
|
|
static inline void exit_aio(struct mm_struct *mm) { }
|
2010-05-26 21:44:26 +00:00
|
|
|
static inline long do_io_submit(aio_context_t ctx_id, long nr,
|
|
|
|
struct iocb __user * __user *iocbpp,
|
|
|
|
bool compat) { return 0; }
|
2013-05-07 23:18:49 +00:00
|
|
|
static inline void kiocb_set_cancel_fn(struct kiocb *req,
|
|
|
|
kiocb_cancel_fn *cancel) { }
|
2008-10-16 05:05:12 +00:00
|
|
|
#endif /* CONFIG_AIO */
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
/* for sysctl: */
|
2005-11-07 08:59:31 +00:00
|
|
|
extern unsigned long aio_nr;
|
|
|
|
extern unsigned long aio_max_nr;
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
#endif /* __LINUX__AIO_H */
|