void block_job_sleep_ns(BlockJob *job, QEMUClockType type, int64_t ns)

{

    assert(job->busy);



    /* Check cancellation *before* setting busy = false, too!  */

    if (block_job_is_cancelled(job)) {

        return;

    }



    job->busy = false;

    if (!block_job_should_pause(job)) {

        co_aio_sleep_ns(blk_get_aio_context(job->blk), type, ns);

    }

    /* The job can be paused while sleeping, so check this again */

    if (block_job_should_pause(job)) {

        qemu_coroutine_yield();

    }

    job->busy = true;

}

void block_job_sleep_ns(BlockJob *job, QEMUClockType type, int64_t ns)

{

    assert(job->busy);



    

    if (block_job_is_cancelled(job)) {

        return;

    }



    job->busy = false;

    if (!block_job_should_pause(job)) {

        co_aio_sleep_ns(blk_get_aio_context(job->blk), type, ns);

    }

    

    if (block_job_should_pause(job)) {

        qemu_coroutine_yield();

    }

    job->busy = true;

}

    if (block_job_should_pause(job)) {         qemu_coroutine_yield();
void FUNC_0(BlockJob *VAR_0, QEMUClockType VAR_1, int64_t VAR_2)

{

    assert(VAR_0->busy);



    

    if (block_job_is_cancelled(VAR_0)) {

        return;

    }



    VAR_0->busy = false;

    if (!block_job_should_pause(VAR_0)) {

        co_aio_sleep_ns(blk_get_aio_context(VAR_0->blk), VAR_1, VAR_2);

    }

    

    if (block_job_should_pause(VAR_0)) {

        qemu_coroutine_yield();

    }

    VAR_0->busy = true;

}

void FUNC_0(BlockJob *VAR_0, QEMUClockType VAR_1, int64_t VAR_2)
{ assert(VAR_0->busy); if (block_job_is_cancelled(VAR_0)) { return; } VAR_0->busy = false; if (!block_job_should_pause(VAR_0)) { co_aio_sleep_ns(blk_get_aio_context(VAR_0->blk), VAR_1, VAR_2); } if (block_job_should_pause(VAR_0)) { qemu_coroutine_yield(); } VAR_0->busy = true; }