mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
job: Move job_finish_sync() to Job
block_job_finish_sync() doesn't contain anything block job specific any more, so it can be moved to Job. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
3453d97243
commit
6a74c075ac
4 changed files with 49 additions and 49 deletions
|
@ -389,6 +389,15 @@ typedef void JobDeferToMainLoopFn(Job *job, void *opaque);
|
|||
*/
|
||||
void job_defer_to_main_loop(Job *job, JobDeferToMainLoopFn *fn, void *opaque);
|
||||
|
||||
/**
|
||||
* Synchronously finishes the given @job. If @finish is given, it is called to
|
||||
* trigger completion or cancellation of the job.
|
||||
*
|
||||
* Returns 0 if the job is successfully completed, -ECANCELED if the job was
|
||||
* cancelled before completing, and -errno in other error cases.
|
||||
*/
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue