BlockDriverAIOCB *paio_submit(BlockDriverState *bs, int fd,

        int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,

        BlockDriverCompletionFunc *cb, void *opaque, int type)

{

    struct qemu_paiocb *acb;



    acb = qemu_aio_get(&raw_aio_pool, bs, cb, opaque);

    if (!acb)

        return NULL;

    acb->aio_type = type;

    acb->aio_fildes = fd;

    acb->ev_signo = SIGUSR2;

    acb->async_context_id = get_async_context_id();



    if (qiov) {

        acb->aio_iov = qiov->iov;

        acb->aio_niov = qiov->niov;

    }

    acb->aio_nbytes = nb_sectors * 512;

    acb->aio_offset = sector_num * 512;



    acb->next = posix_aio_state->first_aio;

    posix_aio_state->first_aio = acb;



    trace_paio_submit(acb, opaque, sector_num, nb_sectors, type);

    qemu_paio_submit(acb);

    return &acb->common;

}

BlockDriverAIOCB *paio_submit(BlockDriverState *bs, int fd,

        int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,

        BlockDriverCompletionFunc *cb, void *opaque, int type)

{

    struct qemu_paiocb *acb;



    acb = qemu_aio_get(&raw_aio_pool, bs, cb, opaque);

    if (!acb)

        return NULL;

    acb->aio_type = type;

    acb->aio_fildes = fd;

    acb->ev_signo = SIGUSR2;

    acb->async_context_id = get_async_context_id();



    if (qiov) {

        acb->aio_iov = qiov->iov;

        acb->aio_niov = qiov->niov;

    }

    acb->aio_nbytes = nb_sectors * 512;

    acb->aio_offset = sector_num * 512;



    acb->next = posix_aio_state->first_aio;

    posix_aio_state->first_aio = acb;



    trace_paio_submit(acb, opaque, sector_num, nb_sectors, type);

    qemu_paio_submit(acb);

    return &acb->common;

}

BlockDriverAIOCB *FUNC_0(BlockDriverState *bs, int fd,

        int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,

        BlockDriverCompletionFunc *cb, void *opaque, int type)

{

    struct qemu_paiocb *VAR_0;



    VAR_0 = qemu_aio_get(&raw_aio_pool, bs, cb, opaque);

    if (!VAR_0)

        return NULL;

    VAR_0->aio_type = type;

    VAR_0->aio_fildes = fd;

    VAR_0->ev_signo = SIGUSR2;

    VAR_0->async_context_id = get_async_context_id();



    if (qiov) {

        VAR_0->aio_iov = qiov->iov;

        VAR_0->aio_niov = qiov->niov;

    }

    VAR_0->aio_nbytes = nb_sectors * 512;

    VAR_0->aio_offset = sector_num * 512;



    VAR_0->next = posix_aio_state->first_aio;

    posix_aio_state->first_aio = VAR_0;



    trace_paio_submit(VAR_0, opaque, sector_num, nb_sectors, type);

    qemu_paio_submit(VAR_0);

    return &VAR_0->common;

}

BlockDriverAIOCB *FUNC_0(BlockDriverState *bs, int fd,
int64_t sector_num, QEMUIOVector *qiov, int nb_sectors,
BlockDriverCompletionFunc *cb, void *opaque, int type)
{ struct qemu_paiocb *VAR_0; VAR_0 = qemu_aio_get(&raw_aio_pool, bs, cb, opaque); if (!VAR_0)
return NULL; VAR_0->aio_type = type; VAR_0->aio_fildes = fd; VAR_0->ev_signo = SIGUSR2; VAR_0->async_context_id = get_async_context_id(); if (qiov) { VAR_0->aio_iov = qiov->iov; VAR_0->aio_niov = qiov->niov; } VAR_0->aio_nbytes = nb_sectors * 512; VAR_0->aio_offset = sector_num * 512; VAR_0->next = posix_aio_state->first_aio; posix_aio_state->first_aio = VAR_0; trace_paio_submit(VAR_0, opaque, sector_num, nb_sectors, type); qemu_paio_submit(VAR_0); return &VAR_0->common; }