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_is_paused(job)) {

        qemu_coroutine_yield();

    } else {

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

    }

    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_is_paused(job)) {

        qemu_coroutine_yield();

    } else {

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

    }

    job->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_is_paused(VAR_0)) {

        qemu_coroutine_yield();

    } else {

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

    }

    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_is_paused(VAR_0)) { qemu_coroutine_yield(); } else { co_aio_sleep_ns(blk_get_aio_context(VAR_0->blk), VAR_1, VAR_2); } VAR_0->busy = true; }