提交 a82417b5 编写于 作者: D Daniel P. Berrange 提交者: Stefan Hajnoczi

trace: break circular dependency in event-internal.h

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
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: NLluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
Message-id: 1475588159-30598-9-git-send-email-berrange@redhat.com
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
上级 99672c71
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册