mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
job: refactor progress to separate object
We need it in separate to pass to the block-copy object in the next commit. Cc: qemu-stable@nongnu.org Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200311103004.7649-2-vsementsov@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
e7266570f2
commit
01fe1ca945
6 changed files with 76 additions and 25 deletions
6
job.c
6
job.c
|
@ -369,17 +369,17 @@ void job_unref(Job *job)
|
|||
|
||||
void job_progress_update(Job *job, uint64_t done)
|
||||
{
|
||||
job->progress_current += done;
|
||||
progress_work_done(&job->progress, done);
|
||||
}
|
||||
|
||||
void job_progress_set_remaining(Job *job, uint64_t remaining)
|
||||
{
|
||||
job->progress_total = job->progress_current + remaining;
|
||||
progress_set_remaining(&job->progress, remaining);
|
||||
}
|
||||
|
||||
void job_progress_increase_remaining(Job *job, uint64_t delta)
|
||||
{
|
||||
job->progress_total += delta;
|
||||
progress_increase_remaining(&job->progress, delta);
|
||||
}
|
||||
|
||||
void job_event_cancelled(Job *job)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue