mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
Configure out AIO support
This patchs adds the CONFIG_AIO option which allows to remove support for asynchronous I/O operations, that are not necessarly used by applications, particularly on embedded devices. As this is a size-reduction option, it depends on CONFIG_EMBEDDED. It allows to save ~7 kilobytes of kernel code/data: text data bss dec hex filename 1115067 119180 217088 1451335 162547 vmlinux 1108025 119048 217088 1444161 160941 vmlinux.new -7042 -132 0 -7174 -1C06 +/- This patch has been originally written by Matt Mackall <mpm@selenic.com>, and is part of the Linux Tiny project. [randy.dunlap@oracle.com: build fix] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Benjamin LaHaise <bcrl@kvack.org> Cc: Zach Brown <zach.brown@oracle.com> Signed-off-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
d827367472
commit
ebf3f09c63
5 changed files with 26 additions and 1 deletions
|
@ -204,12 +204,21 @@ struct kioctx {
|
|||
/* prototypes */
|
||||
extern unsigned aio_max_size;
|
||||
|
||||
#ifdef CONFIG_AIO
|
||||
extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
|
||||
extern int aio_put_req(struct kiocb *iocb);
|
||||
extern void kick_iocb(struct kiocb *iocb);
|
||||
extern int aio_complete(struct kiocb *iocb, long res, long res2);
|
||||
struct mm_struct;
|
||||
extern void exit_aio(struct mm_struct *mm);
|
||||
#else
|
||||
static inline ssize_t wait_on_sync_kiocb(struct kiocb *iocb) { return 0; }
|
||||
static inline int aio_put_req(struct kiocb *iocb) { return 0; }
|
||||
static inline void kick_iocb(struct kiocb *iocb) { }
|
||||
static inline int aio_complete(struct kiocb *iocb, long res, long res2) { return 0; }
|
||||
struct mm_struct;
|
||||
static inline void exit_aio(struct mm_struct *mm) { }
|
||||
#endif /* CONFIG_AIO */
|
||||
|
||||
#define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue