From patchwork Thu Sep 22 08:40:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 673228 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sfr2K5Rnkz9sBX for ; Thu, 22 Sep 2016 18:56:25 +1000 (AEST) Received: from localhost ([::1]:32866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmznr-0007X4-Bb for incoming@patchwork.ozlabs.org; Thu, 22 Sep 2016 04:56:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmzZ8-0001bn-Hm for qemu-devel@nongnu.org; Thu, 22 Sep 2016 04:41:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmzZ6-00070K-Vc for qemu-devel@nongnu.org; Thu, 22 Sep 2016 04:41:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmzZ6-0006zr-P0 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 04:41:08 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3F88580B20; Thu, 22 Sep 2016 08:41:08 +0000 (UTC) Received: from t530wlan.home.berrange.com.com (vpn1-7-180.ams2.redhat.com [10.36.7.180]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8M8evGe003239; Thu, 22 Sep 2016 04:41:06 -0400 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Thu, 22 Sep 2016 09:40:41 +0100 Message-Id: <1474533652-31170-7-git-send-email-berrange@redhat.com> In-Reply-To: <1474533652-31170-1-git-send-email-berrange@redhat.com> References: <1474533652-31170-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 22 Sep 2016 08:41:08 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 06/17] trace: break circular dependency in event-internal.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Llu=C3=ADs=20Vilanova?= , Stefan Hajnoczi Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Currently event-internal.h includes generated-events.h, while generated-events.h includes event-internal.h causing a circular dependency. event-internal.h requires that the content of generated-events.h comes first, so that it can see the typedefs for TraceEventID and TraceEventVCPUID. Switching the TraceEvent struct to use uint32_t for the two ID fields, removes the dependency on the typedef, allowing events-internal.h to be a self-contained header. This will then let the patch following this move event-internal.h to the top of generated-events.h, so we can expose TraceEvent struct variables in generated-events.h Signed-off-by: Daniel P. Berrange Reviewed-by: LluĂ­s Vilanova Reviewed-by: Stefan Hajnoczi --- trace/event-internal.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/trace/event-internal.h b/trace/event-internal.h index 4a98d09..58f0551 100644 --- a/trace/event-internal.h +++ b/trace/event-internal.h @@ -10,9 +10,6 @@ #ifndef TRACE__EVENT_INTERNAL_H #define TRACE__EVENT_INTERNAL_H -#include "trace/generated-events.h" - - /** * TraceEvent: * @id: Unique event identifier. @@ -29,8 +26,8 @@ * Opaque generic description of a tracing event. */ typedef struct TraceEvent { - TraceEventID id; - TraceEventVCPUID vcpu_id; + uint32_t id; + uint32_t vcpu_id; const char * name; const bool sstate; uint16_t *dstate;