2 * QEMU posix-aio emulation
4 * Copyright IBM, Corp. 2008
7 * Anthony Liguori <aliguori@us.ibm.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #ifndef QEMU_POSIX_AIO_COMPAT_H
15 #define QEMU_POSIX_AIO_COMPAT_H
17 #include <sys/types.h>
21 #include "sys-queue.h"
23 #define QEMU_PAIO_CANCELED 0x01
24 #define QEMU_PAIO_NOTCANCELED 0x02
25 #define QEMU_PAIO_ALLDONE 0x03
36 TAILQ_ENTRY(qemu_paiocb
) node
;
44 unsigned int aio_threads
;
46 unsigned int aio_idle_time
;
49 int qemu_paio_init(struct qemu_paioinit
*aioinit
);
50 int qemu_paio_read(struct qemu_paiocb
*aiocb
);
51 int qemu_paio_write(struct qemu_paiocb
*aiocb
);
52 int qemu_paio_error(struct qemu_paiocb
*aiocb
);
53 ssize_t
qemu_paio_return(struct qemu_paiocb
*aiocb
);
54 int qemu_paio_cancel(int fd
, struct qemu_paiocb
*aiocb
);