Revision 85e8dab1 qemu-aio.h

b/qemu-aio.h
17 17
#include "qemu-common.h"
18 18
#include "qemu-char.h"
19 19

  
20
typedef struct BlockDriverAIOCB BlockDriverAIOCB;
21
typedef void BlockDriverCompletionFunc(void *opaque, int ret);
22

  
23
typedef struct AIOPool {
24
    void (*cancel)(BlockDriverAIOCB *acb);
25
    int aiocb_size;
26
    BlockDriverAIOCB *free_aiocb;
27
} AIOPool;
28

  
29
struct BlockDriverAIOCB {
30
    AIOPool *pool;
31
    BlockDriverState *bs;
32
    BlockDriverCompletionFunc *cb;
33
    void *opaque;
34
    BlockDriverAIOCB *next;
35
};
36

  
37
void *qemu_aio_get(AIOPool *pool, BlockDriverState *bs,
38
                   BlockDriverCompletionFunc *cb, void *opaque);
39
void qemu_aio_release(void *p);
40

  
20 41
/* Returns 1 if there are still outstanding AIO requests; 0 otherwise */
21 42
typedef int (AioFlushHandler)(void *opaque);
22 43

  

Also available in: Unified diff