From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com, kwolf@redhat.com
Subject: Re: [PATCH v3 4/5] coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h
Date: Thu, 22 Dec 2022 09:56:52 +0100 [thread overview]
Message-ID: <87sfh7g6jv.fsf@pond.sub.org> (raw)
In-Reply-To: <f6be3b34-acfd-8ac2-1b13-9cff62a8542e@redhat.com> (Paolo Bonzini's message of "Thu, 22 Dec 2022 09:01:24 +0100")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 12/21/22 14:14, Markus Armbruster wrote:
>> +/**
>> + * Mark a function that executes in coroutine context
>> + *
>> + *
>> + * Functions that execute in coroutine context cannot be called
>> + * directly from normal functions. Use @coroutine_fn to mark such
>> + * functions. For example:
>> + *
>> + * static void coroutine_fn foo(void) {
>> + * ....
>> + * }
>> + *
>> + * In the future it would be nice to have the compiler or a static
>> + * checker catch misuse of such functions. This annotation might make
>> + * it possible and in the meantime it serves as documentation.
>> + */
>> +
>
> Is it intentional that "#define coroutine_fn" is not here?
Yes: I moved it to qemu/osdep.h in PATCH 2, along with its doc comment.
To avoid compromising coroutine.h as overview documentation, I added
rephrased documentation there.
This patch copies this rephrased documentation to coroutine-core.h.
I'm open to better ideas.
next prev parent reply other threads:[~2022-12-22 8:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 13:14 [PATCH v3 0/5] coroutine: Clean up includes Markus Armbruster
2022-12-21 13:14 ` [PATCH v3 1/5] coroutine: Clean up superfluous inclusion of qemu/coroutine.h Markus Armbruster
2022-12-21 13:14 ` [PATCH v3 2/5] coroutine: Move coroutine_fn to qemu/osdep.h, trim includes Markus Armbruster
2022-12-21 13:14 ` [PATCH v3 3/5] coroutine: Clean up superfluous inclusion of qemu/lockable.h Markus Armbruster
2022-12-21 13:14 ` [PATCH v3 4/5] coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h Markus Armbruster
2022-12-22 8:01 ` Paolo Bonzini
2022-12-22 8:56 ` Markus Armbruster [this message]
2022-12-22 11:14 ` Paolo Bonzini
2022-12-21 13:14 ` [PATCH v3 5/5] coroutine: Use Coroutine typedef name instead of structure tag Markus Armbruster
2022-12-21 21:47 ` [PATCH v3 0/5] coroutine: Clean up includes Philippe Mathieu-Daudé
2022-12-22 5:21 ` Markus Armbruster
2022-12-22 7:09 ` Philippe Mathieu-Daudé
2022-12-22 10:02 ` Markus Armbruster
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=87sfh7g6jv.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.