* [PATCH] coroutine: Drop coroutine_fn annotation from qemu_coroutine_self()
@ 2022-10-05 17:52 Alberto Faria
2022-10-05 22:07 ` Paolo Bonzini
2022-10-06 8:37 ` Kevin Wolf
0 siblings, 2 replies; 3+ messages in thread
From: Alberto Faria @ 2022-10-05 17:52 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, Alberto Faria
qemu_coroutine_self() can be called from outside coroutine context,
returning the leader coroutine, and several such invocations currently
exist (mostly in qcow2 tracing calls).
Signed-off-by: Alberto Faria <afaria@redhat.com>
---
include/qemu/coroutine.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index c61dd2d3f7..c77ccd80f5 100644
--- a/include/qemu/coroutine.h
+++ b/include/qemu/coroutine.h
@@ -122,7 +122,7 @@ AioContext *coroutine_fn qemu_coroutine_get_aio_context(Coroutine *co);
/**
* Get the currently executing coroutine
*/
-Coroutine *coroutine_fn qemu_coroutine_self(void);
+Coroutine *qemu_coroutine_self(void);
/**
* Return whether or not currently inside a coroutine
--
2.37.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] coroutine: Drop coroutine_fn annotation from qemu_coroutine_self()
2022-10-05 17:52 [PATCH] coroutine: Drop coroutine_fn annotation from qemu_coroutine_self() Alberto Faria
@ 2022-10-05 22:07 ` Paolo Bonzini
2022-10-06 8:37 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2022-10-05 22:07 UTC (permalink / raw)
To: Alberto Faria, qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi
On 10/5/22 19:52, Alberto Faria wrote:
> qemu_coroutine_self() can be called from outside coroutine context,
> returning the leader coroutine, and several such invocations currently
> exist (mostly in qcow2 tracing calls).
>
> Signed-off-by: Alberto Faria <afaria@redhat.com>
> ---
> include/qemu/coroutine.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
> index c61dd2d3f7..c77ccd80f5 100644
> --- a/include/qemu/coroutine.h
> +++ b/include/qemu/coroutine.h
> @@ -122,7 +122,7 @@ AioContext *coroutine_fn qemu_coroutine_get_aio_context(Coroutine *co);
> /**
> * Get the currently executing coroutine
> */
> -Coroutine *coroutine_fn qemu_coroutine_self(void);
> +Coroutine *qemu_coroutine_self(void);
>
> /**
> * Return whether or not currently inside a coroutine
The alternative would be to have two versions, one that is coroutine_fn
and one that isn't, but this is certainly okay too!
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] coroutine: Drop coroutine_fn annotation from qemu_coroutine_self()
2022-10-05 17:52 [PATCH] coroutine: Drop coroutine_fn annotation from qemu_coroutine_self() Alberto Faria
2022-10-05 22:07 ` Paolo Bonzini
@ 2022-10-06 8:37 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2022-10-06 8:37 UTC (permalink / raw)
To: Alberto Faria; +Cc: qemu-devel, Stefan Hajnoczi
Am 05.10.2022 um 19:52 hat Alberto Faria geschrieben:
> qemu_coroutine_self() can be called from outside coroutine context,
> returning the leader coroutine, and several such invocations currently
> exist (mostly in qcow2 tracing calls).
>
> Signed-off-by: Alberto Faria <afaria@redhat.com>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-06 9:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-05 17:52 [PATCH] coroutine: Drop coroutine_fn annotation from qemu_coroutine_self() Alberto Faria
2022-10-05 22:07 ` Paolo Bonzini
2022-10-06 8:37 ` Kevin Wolf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).