static void poll_set_started(AioContext *ctx, bool started)

{

    AioHandler *node;



    if (started == ctx->poll_started) {

        return;

    }



    ctx->poll_started = started;



    qemu_lockcnt_inc(&ctx->list_lock);

    QLIST_FOREACH_RCU(node, &ctx->aio_handlers, node) {

        IOHandler *fn;



        if (node->deleted) {

            continue;

        }



        if (started) {

            fn = node->io_poll_begin;

        } else {

            fn = node->io_poll_end;

        }



        if (fn) {

            fn(node->opaque);

        }

    }

    qemu_lockcnt_dec(&ctx->list_lock);

}

static void poll_set_started(AioContext *ctx, bool started)

{

    AioHandler *node;



    if (started == ctx->poll_started) {

        return;

    }



    ctx->poll_started = started;



    qemu_lockcnt_inc(&ctx->list_lock);

    QLIST_FOREACH_RCU(node, &ctx->aio_handlers, node) {

        IOHandler *fn;



        if (node->deleted) {

            continue;

        }



        if (started) {

            fn = node->io_poll_begin;

        } else {

            fn = node->io_poll_end;

        }



        if (fn) {

            fn(node->opaque);

        }

    }

    qemu_lockcnt_dec(&ctx->list_lock);

}

static void FUNC_0(AioContext *VAR_0, bool VAR_1)

{

    AioHandler *node;



    if (VAR_1 == VAR_0->poll_started) {

        return;

    }



    VAR_0->poll_started = VAR_1;



    qemu_lockcnt_inc(&VAR_0->list_lock);

    QLIST_FOREACH_RCU(node, &VAR_0->aio_handlers, node) {

        IOHandler *fn;



        if (node->deleted) {

            continue;

        }



        if (VAR_1) {

            fn = node->io_poll_begin;

        } else {

            fn = node->io_poll_end;

        }



        if (fn) {

            fn(node->opaque);

        }

    }

    qemu_lockcnt_dec(&VAR_0->list_lock);

}

static void FUNC_0(AioContext *VAR_0, bool VAR_1)
{ AioHandler *node; if (VAR_1 == VAR_0->poll_started) { return; } VAR_0->poll_started = VAR_1; qemu_lockcnt_inc(&VAR_0->list_lock); QLIST_FOREACH_RCU(node, &VAR_0->aio_handlers, node) { IOHandler *fn; if (node->deleted) { continue; } if (VAR_1) { fn = node->io_poll_begin; } else { fn = node->io_poll_end; } if (fn) { fn(node->opaque); } } qemu_lockcnt_dec(&VAR_0->list_lock); }