Received: from eggs.gnu.org ([2001:4830:134:3::10]:41513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaXVZ-0002Kv-Hf for qemu-devel@nongnu.org; Sun, 27 Oct 2013 17:04:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaXVL-0008Op-Kw for qemu-devel@nongnu.org; Sun, 27 Oct 2013 17:04:25 -0400 Received: from mail6.webfaction.com ([74.55.86.74]:34201 helo=smtp.webfaction.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaXVL-0008Ol-GM for qemu-devel@nongnu.org; Sun, 27 Oct 2013 17:04:11 -0400 From: Charlie Shepherd Date: Sun, 27 Oct 2013 22:03:54 +0100 Message-Id: <1382907834-21255-5-git-send-email-charlie@ctshepherd.com> In-Reply-To: <1382907834-21255-1-git-send-email-charlie@ctshepherd.com> References: <1382907834-21255-1-git-send-email-charlie@ctshepherd.com> Subject: [Qemu-devel] [PATCH v4 4/4] Protect coroutine_fn and blocking_fn with #ifndef List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, gabriel@kerneis.info, charlie@ctshepherd.com, stefanha@gmail.com From: Gabriel Kerneis This patch allows defining coroutine and blocking annotations with ./configure --extra-cflags instead of modifying coroutine.h. Signed-off-by: Gabriel Kerneis --- include/block/coroutine.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/block/coroutine.h b/include/block/coroutine.h index 02ce32d..311ce2b 100644 --- a/include/block/coroutine.h +++ b/include/block/coroutine.h @@ -52,7 +52,9 @@ * .... * } */ +#ifndef coroutine_fn #define coroutine_fn +#endif /** * Mark a function that executes in blocking context @@ -75,7 +77,9 @@ * .... * } */ +#ifndef blocking_fn #define blocking_fn +#endif typedef struct Coroutine Coroutine; -- 1.8.4.rc3