~jderose/ubuntu/raring/qemu/vde-again

« back to all changes in this revision

Viewing changes to posix-aio-compat.h

  • Committer: Bazaar Package Importer
  • Author(s): Aurelien Jarno, Aurelien Jarno
  • Date: 2009-03-22 10:13:17 UTC
  • mfrom: (1.2.1 upstream) (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090322101317-iigjtnu5qil35dtb
Tags: 0.10.1-1
[ Aurelien Jarno ]
* New upstream stable release:
  - patches/80_stable-branch.patch: remove.
* debian/control: 
  - Remove depends on proll.
  - Move depends on device-tree-compiler to build-depends.
  - Bump Standards-Version to 3.8.1 (no changes).
* patches/82_qemu-img_decimal.patch: new patch from upstream to make
  qemu-img accept sizes with decimal values (closes: bug#501400).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * QEMU posix-aio emulation
 
3
 *
 
4
 * Copyright IBM, Corp. 2008
 
5
 *
 
6
 * Authors:
 
7
 *  Anthony Liguori   <aliguori@us.ibm.com>
 
8
 *
 
9
 * This work is licensed under the terms of the GNU GPL, version 2.  See
 
10
 * the COPYING file in the top-level directory.
 
11
 *
 
12
 */
 
13
 
 
14
#ifndef QEMU_POSIX_AIO_COMPAT_H
 
15
#define QEMU_POSIX_AIO_COMPAT_H
 
16
 
 
17
#include <sys/types.h>
 
18
#include <unistd.h>
 
19
#include <signal.h>
 
20
 
 
21
#include "sys-queue.h"
 
22
 
 
23
#define QEMU_PAIO_CANCELED     0x01
 
24
#define QEMU_PAIO_NOTCANCELED  0x02
 
25
#define QEMU_PAIO_ALLDONE      0x03
 
26
 
 
27
struct qemu_paiocb
 
28
{
 
29
    int aio_fildes;
 
30
    void *aio_buf;
 
31
    size_t aio_nbytes;
 
32
    int ev_signo;
 
33
    off_t aio_offset;
 
34
 
 
35
    /* private */
 
36
    TAILQ_ENTRY(qemu_paiocb) node;
 
37
    int is_write;
 
38
    ssize_t ret;
 
39
    int active;
 
40
};
 
41
 
 
42
struct qemu_paioinit
 
43
{
 
44
    unsigned int aio_threads;
 
45
    unsigned int aio_num;
 
46
    unsigned int aio_idle_time;
 
47
};
 
48
 
 
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);
 
55
 
 
56
#endif