aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2014-06-24 20:26:35 +0800
committerKevin Wolf <kwolf@redhat.com>2014-06-26 12:12:22 +0200
commitdc71ce45ded4e872e25c2de32d5e7a71842b0985 (patch)
treeaa75e25f7c562b0bf0e77ed653026d7bacaaff2e /include
parent2b5b7ae917e8db48431631b1c5d909fa46c223a6 (diff)
blockjob: Add block_job_yield()
This will unset busy flag and put coroutine to sleep, can be used to wait for QMP complete/cancel. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/blockjob.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index e443987ea8..67ca076380 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -147,6 +147,14 @@ void *block_job_create(const BlockJobDriver *driver, BlockDriverState *bs,
void block_job_sleep_ns(BlockJob *job, QEMUClockType type, int64_t ns);
/**
+ * block_job_yield:
+ * @job: The job that calls the function.
+ *
+ * Yield the block job coroutine.
+ */
+void block_job_yield(BlockJob *job);
+
+/**
* block_job_completed:
* @job: The job being completed.
* @ret: The status code.