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/qemu/job.h | |
parent | b3b5299d58bce4366c647af40374e6b063f371eb (diff) | |
download | qemu-198c49cc8d81e8eb0df3749d395599895c3a3a76.zip qemu-198c49cc8d81e8eb0df3749d395599895c3a3a76.tar.gz qemu-198c49cc8d81e8eb0df3749d395599895c3a3a76.tar.bz2 |
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/qemu/job.h')
-rw-r--r-- | include/qemu/job.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/qemu/job.h b/include/qemu/job.h index bbe1b0c..94900ec 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 |