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
11 * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
15 * Dual LGPL v2.1/GPL v2 license.
18 #include <linux/seq_file.h>
20 #include "../lttng-events.h"
21 #include "../lttng-tracer.h"
22 #include "../lttng-endian.h"
24 #endif /* _LTTNG_PROBES_LTTNG_TYPES_H */
26 /* Export enumerations */
28 #ifdef STAGE_EXPORT_ENUMS
30 #undef TRACE_EVENT_TYPE
31 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...)
33 #undef TRACE_EVENT_ENUM
34 #define TRACE_EVENT_ENUM(_name, _entries...) \
35 const struct lttng_enum_entry __trace_event_enum_##_name[] = { \
39 /* Enumeration entry (single value) */
41 #define V(_string) { _string, _string, #_string}
43 /* Enumeration entry (range) */
45 #define R(_string, _range_start, _range_end) \
46 { _range_start, _range_end, #_string }
48 #endif /* STAGE_EXPORT_ENUMS */
51 /* Export named types */
53 #ifdef STAGE_EXPORT_TYPES
55 #undef TRACE_EVENT_TYPE___enum
56 #define TRACE_EVENT_TYPE___enum(_name, _container_type) \
59 .container_type = __type_integer(_container_type, __BYTE_ORDER, 10, none), \
60 .entries = __trace_event_enum_##_name, \
61 .len = ARRAY_SIZE(__trace_event_enum_##_name), \
64 /* Local declaration */
65 #undef TRACE_EVENT_TYPE
66 #define TRACE_EVENT_TYPE(_name, _abstract_type, args...) \
67 TRACE_EVENT_TYPE___##_abstract_type(_name, args)
69 #undef TRACE_EVENT_ENUM
70 #define TRACE_EVENT_ENUM(_name, _entries...)
72 #endif /* STAGE_EXPORT_TYPES */
This page took 0.030408 seconds and 4 git commands to generate.