summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-09-28 20:13:05 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-09-28 20:13:05 +0100
commitbc63afaf5f6d906ff56608b52d575ac8dbb09062 (patch)
tree3f727bcf3ffd719f04aa15e3059ff5851aa40f57 /include
parent4af27939e5232c130327066e47eb805be0be1438 (diff)
parentfe121b9d3c4258e41f7efa4976bf79151b2d5dbb (diff)
downloadqemu-bc63afaf5f6d906ff56608b52d575ac8dbb09062.tar.gz
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
# gpg: Signature made Wed 28 Sep 2016 19:15:22 BST # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: linux-aio: fix re-entrant completion processing test-coroutine: test qemu_coroutine_entered() coroutine: add qemu_coroutine_entered() function libqos: fix qvring_init() iothread: check iothread->ctx before aio_context_unref to avoid assertion aio-posix: avoid unnecessary aio_epoll_enabled() calls block: mirror: fix wrong comment of mirror_start Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/block/block_int.h2
-rw-r--r--include/qemu/coroutine.h13
2 files changed, 14 insertions, 1 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index ef3c047cb3..3e79228eb0 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -722,7 +722,7 @@ void commit_active_start(const char *job_id, BlockDriverState *bs,
* @errp: Error object.
*
* Start a mirroring operation on @bs. Clusters that are allocated
- * in @bs will be written to @bs until the job is cancelled or
+ * in @bs will be written to @target until the job is cancelled or
* manually completed. At the end of a successful mirroring job,
* @bs will be switched to read from @target.
*/
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index 29a20782f0..e6a60d55fd 100644
--- a/include/qemu/coroutine.h
+++ b/include/qemu/coroutine.h
@@ -92,6 +92,19 @@ Coroutine *coroutine_fn qemu_coroutine_self(void);
*/
bool qemu_in_coroutine(void);
+/**
+ * Return true if the coroutine is currently entered
+ *
+ * A coroutine is "entered" if it has not yielded from the current
+ * qemu_coroutine_enter() call used to run it. This does not mean that the
+ * coroutine is currently executing code since it may have transferred control
+ * to another coroutine using qemu_coroutine_enter().
+ *
+ * When several coroutines enter each other there may be no way to know which
+ * ones have already been entered. In such situations this function can be
+ * used to avoid recursively entering coroutines.
+ */
+bool qemu_coroutine_entered(Coroutine *co);
/**