aio.h 879 字节
Newer Older
L
Linus Torvalds 已提交
1 2 3 4 5 6
#ifndef __LINUX__AIO_H
#define __LINUX__AIO_H

#include <linux/aio_abi.h>

struct kioctx;
7
struct kiocb;
8
struct mm_struct;
L
Linus Torvalds 已提交
9

K
Kent Overstreet 已提交
10
#define KIOCB_KEY		0
L
Linus Torvalds 已提交
11

12
typedef int (kiocb_cancel_fn)(struct kiocb *);
L
Linus Torvalds 已提交
13 14

/* prototypes */
15
#ifdef CONFIG_AIO
16
extern void exit_aio(struct mm_struct *mm);
17 18
extern long do_io_submit(aio_context_t ctx_id, long nr,
			 struct iocb __user *__user *iocbpp, bool compat);
19
void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel);
20 21
#else
static inline void exit_aio(struct mm_struct *mm) { }
22 23 24
static inline long do_io_submit(aio_context_t ctx_id, long nr,
				struct iocb __user * __user *iocbpp,
				bool compat) { return 0; }
25 26
static inline void kiocb_set_cancel_fn(struct kiocb *req,
				       kiocb_cancel_fn *cancel) { }
27
#endif /* CONFIG_AIO */
L
Linus Torvalds 已提交
28 29

/* for sysctl: */
30 31
extern unsigned long aio_nr;
extern unsigned long aio_max_nr;
L
Linus Torvalds 已提交
32 33

#endif /* __LINUX__AIO_H */
新手
引导
客服 返回
顶部