2 * Protect against multiple inclusion of structure declarations, but run the
3 * stages below each time.
5 #ifndef _LTTNG_PROBES_LTTNG_TYPES_H
6 #define _LTTNG_PROBES_LTTNG_TYPES_H
8 #include <linux/seq_file.h>
10 #include "../ltt-events.h"
11 #include "../ltt-tracer.h"
12 #include "../ltt-endian.h"
14 #endif /* _LTTNG_PROBES_LTTNG_TYPES_H */
16 /* Export enumerations */
18 #ifdef STAGE_EXPORT_ENUMS
20 #undef TRACE_EVENT_TYPE
21 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...)
23 #undef TRACE_EVENT_ENUM
24 #define TRACE_EVENT_ENUM(_name, _entries...) \
25 const struct lttng_enum_entry __trace_event_enum_##_name[] = { \
29 /* Enumeration entry (single value) */
31 #define V(_string) { _string, _string, #_string}
33 /* Enumeration entry (range) */
35 #define R(_string, _range_start, _range_end) \
36 { _range_start, _range_end, #_string }
38 #endif /* STAGE_EXPORT_ENUMS */
41 /* Export named types */
43 #ifdef STAGE_EXPORT_TYPES
45 #undef TRACE_EVENT_TYPE___enum
46 #define TRACE_EVENT_TYPE___enum(_name, _container_type) \
49 .container_type = __type_integer(_container_type, __BYTE_ORDER, 10), \
50 .entries = __trace_event_enum_##_name, \
51 .len = ARRAY_SIZE(__trace_event_enum_##_name), \
54 /* Local declaration */
55 #undef TRACE_EVENT_TYPE
56 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...) \
57 TRACE_EVENT_TYPE___##_abstract_type(_name, args)
59 #undef TRACE_EVENT_ENUM
60 #define TRACE_EVENT_ENUM(_name, _entries...)
62 #endif /* STAGE_EXPORT_TYPES */
This page took 0.031784 seconds and 4 git commands to generate.