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"
14 # include <asm/byteorder.h>
16 # define __BYTE_ORDER __BIG_ENDIAN
17 # elif defined(__LITTLE_ENDIAN)
18 # define __BYTE_ORDER __LITTLE_ENDIAN
20 # error "unknown endianness"
23 # define __BIG_ENDIAN 4321
25 #ifndef __LITTLE_ENDIAN
26 # define __LITTLE_ENDIAN 1234
32 #endif /* _LTTNG_PROBES_LTTNG_TYPES_H */
35 /* Export enumerations */
37 #ifdef STAGE_EXPORT_ENUMS
39 #undef TRACE_EVENT_TYPE
40 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...)
42 #undef TRACE_EVENT_ENUM
43 #define TRACE_EVENT_ENUM(_name, _entries...) \
44 const struct lttng_enum_entry __trace_event_enum_##_name[] = { \
48 /* Enumeration entry (single value) */
50 #define V(_string) { _string, _string, #_string}
52 /* Enumeration entry (range) */
54 #define R(_string, _range_start, _range_end) \
55 { _range_start, _range_end, #_string }
57 #endif /* STAGE_EXPORT_ENUMS */
60 /* Export named types */
62 #ifdef STAGE_EXPORT_TYPES
64 #undef TRACE_EVENT_TYPE___enum
65 #define TRACE_EVENT_TYPE___enum(_name, _container_type) \
68 .container_type = __type_integer(_container_type, __BYTE_ORDER), \
69 .entries = __trace_event_enum_##_name, \
70 .len = ARRAY_SIZE(__trace_event_enum_##_name), \
73 /* Local declaration */
74 #undef TRACE_EVENT_TYPE
75 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...) \
76 TRACE_EVENT_TYPE___##_abstract_type(_name, args)
78 #undef TRACE_EVENT_ENUM
79 #define TRACE_EVENT_ENUM(_name, _entries...)
81 #endif /* STAGE_EXPORT_TYPES */
This page took 0.03332 seconds and 5 git commands to generate.