void aio_bh_update_timeout(AioContext *ctx, uint32_t *timeout)

{

    QEMUBH *bh;



    for (bh = ctx->first_bh; bh; bh = bh->next) {

        if (!bh->deleted && bh->scheduled) {

            if (bh->idle) {

                /* idle bottom halves will be polled at least

                 * every 10ms */

                *timeout = MIN(10, *timeout);

            } else {

                /* non-idle bottom halves will be executed

                 * immediately */

                *timeout = 0;

                break;

            }

        }

    }

}

void aio_bh_update_timeout(AioContext *ctx, uint32_t *timeout)

{

    QEMUBH *bh;



    for (bh = ctx->first_bh; bh; bh = bh->next) {

        if (!bh->deleted && bh->scheduled) {

            if (bh->idle) {

                



                *timeout = MIN(10, *timeout);

            } else {

                



                *timeout = 0;

                break;

            }

        }

    }

}

void FUNC_0(AioContext *VAR_0, uint32_t *VAR_1)

{

    QEMUBH *bh;



    for (bh = VAR_0->first_bh; bh; bh = bh->next) {

        if (!bh->deleted && bh->scheduled) {

            if (bh->idle) {

                



                *VAR_1 = MIN(10, *VAR_1);

            } else {

                



                *VAR_1 = 0;

                break;

            }

        }

    }

}

void FUNC_0(AioContext *VAR_0, uint32_t *VAR_1)
{ QEMUBH *bh; for (bh = VAR_0->first_bh; bh; bh = bh->next) { if (!bh->deleted && bh->scheduled) { if (bh->idle) { *VAR_1 = MIN(10, *VAR_1); } else { *VAR_1 = 0; break; } } } }