job: Add job_yield()

This moves block_job_yield() to the Job layer.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
Kevin Wolf 2018-04-24 16:55:04 +02:00
parent b3b5299d58
commit 198c49cc8d
7 changed files with 28 additions and 31 deletions

View file

@ -47,7 +47,7 @@ static void coroutine_fn test_block_job_run(void *opaque)
if (s->use_timer) {
job_sleep_ns(&job->job, 0);
} else {
block_job_yield(job);
job_yield(&job->job);
}
if (job_is_cancelled(&job->job)) {