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"
13 # include <asm/byteorder.h>
15 # define __BYTE_ORDER __BIG_ENDIAN
16 # elif defined(__LITTLE_ENDIAN)
17 # define __BYTE_ORDER __LITTLE_ENDIAN
19 # error "unknown endianness"
22 # define __BIG_ENDIAN 4321
24 #ifndef __LITTLE_ENDIAN
25 # define __LITTLE_ENDIAN 1234
31 #endif /* _LTTNG_PROBES_LTTNG_TYPES_H */
34 /* Export enumerations */
36 #ifdef STAGE_EXPORT_ENUMS
38 #undef TRACE_EVENT_TYPE
39 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...)
41 #undef TRACE_EVENT_ENUM
42 #define TRACE_EVENT_ENUM(_name, _entries...) \
43 const struct lttng_enum_entry __trace_event_enum_##_name[] = { \
47 /* Enumeration entry (single value) */
49 #define V(_string) { _string, _string, #_string}
51 /* Enumeration entry (range) */
53 #define R(_string, _range_start, _range_end) \
54 { _range_start, _range_end, #_string }
56 #endif /* STAGE_EXPORT_ENUMS */
59 /* Export named types */
61 #ifdef STAGE_EXPORT_TYPES
63 #undef TRACE_EVENT_TYPE___enum
64 #define TRACE_EVENT_TYPE___enum(_name, _container_type) \
67 .container_type = __type_integer(_container_type, __BYTE_ORDER), \
68 .entries = __trace_event_enum_##_name, \
69 .len = ARRAY_SIZE(__trace_event_enum_##_name), \
72 /* Local declaration */
73 #undef TRACE_EVENT_TYPE
74 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...) \
75 TRACE_EVENT_TYPE___##_abstract_type(_name, args)
77 #undef TRACE_EVENT_ENUM
78 #define TRACE_EVENT_ENUM(_name, _entries...)
80 #endif /* STAGE_EXPORT_TYPES */
This page took 0.032761 seconds and 5 git commands to generate.