diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-04-24 16:55:04 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-23 14:30:51 +0200 |
commit | 198c49cc8d81e8eb0df3749d395599895c3a3a76 (patch) | |
tree | de592e39154d0bbe94b9fafaf95af99c3ed2d14d /include | |
parent | b3b5299d58bce4366c647af40374e6b063f371eb (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/blockjob_int.h | 8 | ||||
-rw-r--r-- | include/qemu/job.h | 9 |
2 files changed, 7 insertions, 10 deletions
diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index 7df07b20cf..806ac64d87 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -108,14 +108,6 @@ void block_job_user_resume(Job *job); void block_job_drain(Job *job); /** - * block_job_yield: - * @job: The job that calls the function. - * - * Yield the block job coroutine. - */ -void block_job_yield(BlockJob *job); - -/** * block_job_ratelimit_get_delay: * * Calculate and return delay for the next request in ns. See the documentation diff --git a/include/qemu/job.h b/include/qemu/job.h index bbe1b0cd1a..94900ec008 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -339,6 +339,13 @@ void coroutine_fn job_pause_point(Job *job); /** * @job: The job that calls the function. + * + * Yield the job coroutine. + */ +void job_yield(Job *job); + +/** + * @job: The job that calls the function. * @ns: How many nanoseconds to stop for. * * Put the job to sleep (assuming that it wasn't canceled) for @ns @@ -508,8 +515,6 @@ int job_finish_sync(Job *job, void (*finish)(Job *, Error **errp), Error **errp) /* TODO To be removed from the public interface */ void job_state_transition(Job *job, JobStatus s1); -void coroutine_fn job_do_yield(Job *job, uint64_t ns); -bool job_should_pause(Job *job); void job_do_dismiss(Job *job); #endif |