Document that payload size need to be greater than 0
[lttng-modules.git] / lib / ringbuffer / config.h
index bd5ba77d3ebcd50b7ce17b35c10f4702eb6463fb..67caba0646acffcfa1b99c354f8f1dc7dccc3980 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;
@@ -206,7 +207,7 @@ struct lib_ring_buffer_ctx {
  * @ctx: ring buffer context to initialize
  * @chan: channel
  * @priv: client private data
- * @data_size: size of record data payload
+ * @data_size: size of record data payload. It must be greater than 0.
  * @largest_align: largest alignment within data payload types
  * @cpu: processor id
  */
@@ -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
This page took 0.032294 seconds and 4 git commands to generate.