aboutsummaryrefslogtreecommitdiff
path: root/include/qemu
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2018-06-13 20:18:20 +0200
committerMax Reitz <mreitz@redhat.com>2018-06-18 17:05:11 +0200
commit62f13600593322b8e796f15fd6742064fba6ab65 (patch)
treec8942d45131f9659ac1d20e272c9ba0ae54ab289 /include/qemu
parent429076e88dec48ce22a6fb3ba11e5ccb6134f62d (diff)
downloadqemu-62f13600593322b8e796f15fd6742064fba6ab65.zip
qemu-62f13600593322b8e796f15fd6742064fba6ab65.tar.gz
qemu-62f13600593322b8e796f15fd6742064fba6ab65.tar.bz2
job: Add job_progress_increase_remaining()
Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20180613181823.13618-12-mreitz@redhat.com Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/job.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/qemu/job.h b/include/qemu/job.h
index 1d82053..18c9223 100644
--- a/include/qemu/job.h
+++ b/include/qemu/job.h
@@ -335,6 +335,21 @@ void job_progress_update(Job *job, uint64_t done);
*/
void job_progress_set_remaining(Job *job, uint64_t remaining);
+/**
+ * @job: The job whose expected progress end value is updated
+ * @delta: Value which is to be added to the current expected end
+ * value
+ *
+ * Increases the expected end value of the progress counter of a job.
+ * This is useful for parenthesis operations: If a job has to
+ * conditionally perform a high-priority operation as part of its
+ * progress, it calls this function with the expected operation's
+ * length before, and job_progress_update() afterwards.
+ * (So the operation acts as a parenthesis in regards to the main job
+ * operation running in background.)
+ */
+void job_progress_increase_remaining(Job *job, uint64_t delta);
+
/** To be called when a cancelled job is finalised. */
void job_event_cancelled(Job *job);