From: Stefan Hajnoczi <stefanha@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org,
pbonzini@redhat.com, Kevin Wolf <kwolf@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] coroutine: Fix documentation of co_aio_sleep_ns()
Date: Wed, 8 Nov 2017 15:42:26 +0000 [thread overview]
Message-ID: <20171108154226.GC6118@stefanha-x1.localdomain> (raw)
In-Reply-To: <20171107223708.17935-1-eblake@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]
On Tue, Nov 07, 2017 at 04:37:08PM -0600, 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>
> ---
> 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..01ae415767 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. In any case, co_aio_sleep_ns()
> + * does not affect the #AioContext where the current coroutine is running,
> + * as the coroutine will restart on the same #AioContext that it is
> + * running on.
I cannot parse the second sentence. What does "affecting" an AioContext
mean? Does "where the current coroutine is running" simply mean "the
caller"?
What is it trying to say? My guess is: the caller will be resumed in
the current AioContext, not the timer's AioContext.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2017-11-08 15:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 22:37 [Qemu-devel] [PATCH] coroutine: Fix documentation of co_aio_sleep_ns() Eric Blake
2017-11-08 13:39 ` Marc-André Lureau
2017-11-08 15:42 ` Stefan Hajnoczi [this message]
2017-11-08 15:47 ` Paolo Bonzini
2017-11-08 15:57 ` Eric Blake
2017-11-08 17:36 ` Stefan Hajnoczi
2017-11-08 17:42 ` Eric Blake
2017-11-08 17:44 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171108154226.GC6118@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).