* [Qemu-devel] [PATCH v2] coroutine: Fix documentation of co_aio_sleep_ns()
@ 2017-11-08 16:55 Eric Blake
2017-11-09 6:12 ` Fam Zheng
2017-11-09 14:17 ` Eric Blake
0 siblings, 2 replies; 3+ messages in thread
From: Eric Blake @ 2017-11-08 16:55 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, pbonzini, stefanha, Kevin Wolf
co_sleep_ns() was removed in commit 0b9caf9b, leaving behind a
stale comment. Update the documentation to match the current
usage of this function.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
---
v2: instead of just blindly cribbing from Paolo's email, try to incorporate
the feedback given on the wording
---
include/qemu/coroutine.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index 9aff9a735e..10ab50a98c 100644
--- a/include/qemu/coroutine.h
+++ b/include/qemu/coroutine.h
@@ -262,8 +262,11 @@ void qemu_co_rwlock_unlock(CoRwlock *lock);
/**
* Yield the coroutine for a given duration
*
- * Behaves similarly to co_sleep_ns(), but the sleeping coroutine will be
- * resumed when using aio_poll().
+ * This function uses timers and hence needs to know the event loop
+ * (#AioContext) to place the timer on. After the time elapses, the
+ * current coroutine will restart with the same #AioContext it is
+ * currently running in, even if that is different than the timer
+ * context passed to co_aio_sleep_ns().
*/
void coroutine_fn co_aio_sleep_ns(AioContext *ctx, QEMUClockType type,
int64_t ns);
--
2.13.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] coroutine: Fix documentation of co_aio_sleep_ns()
2017-11-08 16:55 [Qemu-devel] [PATCH v2] coroutine: Fix documentation of co_aio_sleep_ns() Eric Blake
@ 2017-11-09 6:12 ` Fam Zheng
2017-11-09 14:17 ` Eric Blake
1 sibling, 0 replies; 3+ messages in thread
From: Fam Zheng @ 2017-11-09 6:12 UTC (permalink / raw)
To: Eric Blake; +Cc: qemu-devel, qemu-trivial, pbonzini, Kevin Wolf, stefanha
On Wed, 11/08 10:55, Eric Blake wrote:
> co_sleep_ns() was removed in commit 0b9caf9b, leaving behind a
> stale comment. Update the documentation to match the current
> usage of this function.
>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Eric Blake <eblake@redhat.com>
>
> ---
> v2: instead of just blindly cribbing from Paolo's email, try to incorporate
> the feedback given on the wording
> ---
> include/qemu/coroutine.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
> index 9aff9a735e..10ab50a98c 100644
> --- a/include/qemu/coroutine.h
> +++ b/include/qemu/coroutine.h
> @@ -262,8 +262,11 @@ void qemu_co_rwlock_unlock(CoRwlock *lock);
> /**
> * Yield the coroutine for a given duration
> *
> - * Behaves similarly to co_sleep_ns(), but the sleeping coroutine will be
> - * resumed when using aio_poll().
> + * This function uses timers and hence needs to know the event loop
> + * (#AioContext) to place the timer on. After the time elapses, the
> + * current coroutine will restart with the same #AioContext it is
> + * currently running in, even if that is different than the timer
> + * context passed to co_aio_sleep_ns().
> */
> void coroutine_fn co_aio_sleep_ns(AioContext *ctx, QEMUClockType type,
> int64_t ns);
> --
> 2.13.6
>
>
Reviewed-by: Fam Zheng <famz@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] coroutine: Fix documentation of co_aio_sleep_ns()
2017-11-08 16:55 [Qemu-devel] [PATCH v2] coroutine: Fix documentation of co_aio_sleep_ns() Eric Blake
2017-11-09 6:12 ` Fam Zheng
@ 2017-11-09 14:17 ` Eric Blake
1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2017-11-09 14:17 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, pbonzini, Kevin Wolf, stefanha
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]
On 11/08/2017 10:55 AM, Eric Blake wrote:
> co_sleep_ns() was removed in commit 0b9caf9b, leaving behind a
> stale comment. Update the documentation to match the current
> usage of this function.
>
> Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Eric Blake <eblake@redhat.com>
>
> ---
> v2: instead of just blindly cribbing from Paolo's email, try to incorporate
> the feedback given on the wording
> ---
> include/qemu/coroutine.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Self-NAK; superseded by:
https://lists.gnu.org/archive/html/qemu-devel/2017-11/msg01681.html
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-09 14:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-08 16:55 [Qemu-devel] [PATCH v2] coroutine: Fix documentation of co_aio_sleep_ns() Eric Blake
2017-11-09 6:12 ` Fam Zheng
2017-11-09 14:17 ` Eric Blake
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).