From e7e4f9f950253ce5fb03f569868a21d6d7e3f8a2 Mon Sep 17 00:00:00 2001 From: Yaowei Bai Date: Wed, 14 Sep 2016 07:03:38 -0400 Subject: block: mirror: fix wrong comment of mirror_start Obviously, we should write to '@target'. Signed-off-by: Yaowei Bai Reviewed-by: Xiubo Li Reviewed-by: Eric Blake Message-id: 1473851019-7005-2-git-send-email-baiyaowei@cmss.chinamobile.com Signed-off-by: Stefan Hajnoczi --- include/block/block_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') 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. */ -- cgit v1.2.3 From f643e469f31df735fd5c42ab317f96ebfe749871 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Tue, 27 Sep 2016 16:18:34 +0100 Subject: coroutine: add qemu_coroutine_entered() function See the doc comments for a description of this new coroutine API. Signed-off-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Message-id: 1474989516-18255-2-git-send-email-stefanha@redhat.com Signed-off-by: Stefan Hajnoczi --- include/qemu/coroutine.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include') 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); /** -- cgit v1.2.3