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