xref: /openbmc/linux/include/linux/aio.h (revision ba61bb17)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __LINUX__AIO_H
3 #define __LINUX__AIO_H
4 
5 #include <linux/aio_abi.h>
6 
7 struct kioctx;
8 struct kiocb;
9 struct mm_struct;
10 
11 typedef int (kiocb_cancel_fn)(struct kiocb *);
12 
13 /* prototypes */
14 #ifdef CONFIG_AIO
15 extern void exit_aio(struct mm_struct *mm);
16 void kiocb_set_cancel_fn(struct kiocb *req, kiocb_cancel_fn *cancel);
17 #else
18 static inline void exit_aio(struct mm_struct *mm) { }
19 static inline void kiocb_set_cancel_fn(struct kiocb *req,
20 				       kiocb_cancel_fn *cancel) { }
21 #endif /* CONFIG_AIO */
22 
23 /* for sysctl: */
24 extern unsigned long aio_nr;
25 extern unsigned long aio_max_nr;
26 
27 #endif /* __LINUX__AIO_H */
28