Fix cleanup: move lttng-tracer-core.h include to lib ringbuffer config.h
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 20 Sep 2012 14:20:38 +0000 (10:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 20 Sep 2012 14:20:38 +0000 (10:20 -0400)
This is where it is used. Add a #ifdef check for the LTTNG_TRACER_CORE_H
define to ensure that the header it depends on is always included.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lib/ringbuffer/config.h
lib/ringbuffer/ring_buffer_frontend.c

index bd5ba77d3ebcd50b7ce17b35c10f4702eb6463fb..657c04d224a431ef41c7627aaf41a494072304c8 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/types.h>
 #include <linux/percpu.h>
 #include "../align.h"
+#include "../../lttng-tracer-core.h"
 
 struct lib_ring_buffer;
 struct channel;
@@ -241,6 +242,10 @@ void lib_ring_buffer_ctx_init(struct lib_ring_buffer_ctx *ctx,
 #define        RING_BUFFER_RFLAG_FULL_TSC              (1U << 0)
 #define RING_BUFFER_RFLAG_END                  (1U << 1)
 
+#ifndef LTTNG_TRACER_CORE_H
+#error "lttng-tracer-core.h is needed for RING_BUFFER_ALIGN define"
+#endif
+
 /*
  * We need to define RING_BUFFER_ALIGN_ATTR so it is known early at
  * compile-time. We have to duplicate the "config->align" information and the
index a04333a333b62527cb61574c450f42fa78fbab57..dc0357f56a3e71547c7da80a4e2bd3ce7277d0f0 100644 (file)
@@ -55,7 +55,6 @@
 #include <linux/module.h>
 #include <linux/percpu.h>
 
-#include "../../lttng-tracer-core.h"
 #include "../../wrapper/ringbuffer/config.h"
 #include "../../wrapper/ringbuffer/backend.h"
 #include "../../wrapper/ringbuffer/frontend.h"
This page took 0.028726 seconds and 4 git commands to generate.