qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 4/5] coroutine: Split qemu/coroutine-core.h off qemu/corou


From: Paolo Bonzini
Subject: Re: [PATCH v3 4/5] coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h
Date: Thu, 22 Dec 2022 12:14:21 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0

On 12/22/22 09:56, 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.

Got it. coroutine.h is not included in the developer documentation so that didn't occur to me but I understand it now.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]