swh:1:snp:c3bf2749e3476071fa748f67b0ffa2fdc5fe49d9
Raw File
Tip revision: 168309855a7d1e16db751e9c647119fe2d2dc878 authored by Linus Torvalds on 03 January 2016, 23:15:37 UTC
Linux 4.4-rc8
Tip revision: 1683098
aio.h
/*
 * Copyright (C) 2004 Jeff Dike (jdike@karaya.com)
 * Licensed under the GPL
 */

#ifndef AIO_H__
#define AIO_H__

enum aio_type { AIO_READ, AIO_WRITE, AIO_MMAP };

struct aio_thread_reply {
	void *data;
	int err;
};

struct aio_context {
	int reply_fd;
	struct aio_context *next;
};

#define INIT_AIO_CONTEXT { .reply_fd	= -1, \
			   .next	= NULL }

extern int submit_aio(enum aio_type type, int fd, char *buf, int len,
		      unsigned long long offset, int reply_fd,
                      struct aio_context *aio);

#endif
back to top