From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6Pm4-0001hp-Sq for qemu-devel@nongnu.org; Mon, 05 Aug 2013 14:45:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6Plw-0007LJ-Pn for qemu-devel@nongnu.org; Mon, 05 Aug 2013 14:44:56 -0400 Received: from mail6.webfaction.com ([74.55.86.74]:42551 helo=smtp.webfaction.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6Plw-0007Kk-Kv for qemu-devel@nongnu.org; Mon, 05 Aug 2013 14:44:48 -0400 From: Charlie Shepherd Date: Mon, 5 Aug 2013 20:44:03 +0200 Message-Id: <1375728247-1306-2-git-send-email-charlie@ctshepherd.com> In-Reply-To: <1375728247-1306-1-git-send-email-charlie@ctshepherd.com> References: <1375728247-1306-1-git-send-email-charlie@ctshepherd.com> Subject: [Qemu-devel] [PATCH 1/5] Add an explanation of when a function should be marked coroutine_fn List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, Charlie Shepherd , gabriel@kerneis.info, stefanha@gmail.com From: Charlie Shepherd Coroutine functions that can yield directly or indirectly should be annotated with a coroutine_fn annotation. Add an explanation to that effect in include/block/coroutine.h. --- include/block/coroutine.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/block/coroutine.h b/include/block/coroutine.h index 377805a..3b94b6d 100644 --- a/include/block/coroutine.h +++ b/include/block/coroutine.h @@ -37,6 +37,9 @@ * static checker support for catching such errors. This annotation might make * it possible and in the meantime it serves as documentation. * + * A function must be marked with coroutine_fn if it can yield execution, either + * directly or indirectly. + * * For example: * * static void coroutine_fn foo(void) { -- 1.8.3.2