From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn314-0006IG-NO for qemu-devel@nongnu.org; Thu, 22 Sep 2016 08:22:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn311-0000g3-Ed for qemu-devel@nongnu.org; Thu, 22 Sep 2016 08:22:14 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:43768) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn311-0000fs-38 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 08:22:11 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <1474533652-31170-1-git-send-email-berrange@redhat.com> <1474533652-31170-7-git-send-email-berrange@redhat.com> Date: Thu, 22 Sep 2016 14:22:09 +0200 In-Reply-To: <1474533652-31170-7-git-send-email-berrange@redhat.com> (Daniel P. Berrange's message of "Thu, 22 Sep 2016 09:40:41 +0100") Message-ID: <87h998p1ji.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v4 06/17] trace: break circular dependency in event-internal.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Daniel P Berrange writes: > 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 This comma should be removed. > 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=C3=ADs Vilanova > --- > 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 =20 > -#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; > --=20 > 2.7.4