Mass rename: ltt_*/ltt-* to LTTNG_*/LTTNG-*
[lttng-modules.git] / probes / lttng-types.h
CommitLineData
40652b65
MD
1/*
2 * Protect against multiple inclusion of structure declarations, but run the
3 * stages below each time.
4 */
5#ifndef _LTTNG_PROBES_LTTNG_TYPES_H
6#define _LTTNG_PROBES_LTTNG_TYPES_H
7
17baffe2
MD
8/*
9 * probes/lttng-types.h
10 *
11 * Copyright 2010 (c) - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 *
13 * LTTng types.
14 *
15 * Dual LGPL v2.1/GPL v2 license.
16 */
17
d0dd2ecb 18#include <linux/seq_file.h>
c0edae1d 19#include "lttng.h"
a90917c3
MD
20#include "../lttng-events.h"
21#include "../lttng-tracer.h"
22#include "../lttng-endian.h"
1d12cebd 23
40652b65
MD
24#endif /* _LTTNG_PROBES_LTTNG_TYPES_H */
25
40652b65
MD
26/* Export enumerations */
27
28#ifdef STAGE_EXPORT_ENUMS
29
30#undef TRACE_EVENT_TYPE
31#define TRACE_EVENT_TYPE(_name, _abstract_type, args...)
32
33#undef TRACE_EVENT_ENUM
34#define TRACE_EVENT_ENUM(_name, _entries...) \
35 const struct lttng_enum_entry __trace_event_enum_##_name[] = { \
36 PARAMS(_entries) \
37 };
38
39/* Enumeration entry (single value) */
40#undef V
41#define V(_string) { _string, _string, #_string}
42
43/* Enumeration entry (range) */
44#undef R
45#define R(_string, _range_start, _range_end) \
46 { _range_start, _range_end, #_string }
47
48#endif /* STAGE_EXPORT_ENUMS */
49
50
51/* Export named types */
52
53#ifdef STAGE_EXPORT_TYPES
54
40652b65 55#undef TRACE_EVENT_TYPE___enum
c099397a
MD
56#define TRACE_EVENT_TYPE___enum(_name, _container_type) \
57 { \
58 .name = #_name, \
64c796d8 59 .container_type = __type_integer(_container_type, __BYTE_ORDER, 10, none), \
c099397a
MD
60 .entries = __trace_event_enum_##_name, \
61 .len = ARRAY_SIZE(__trace_event_enum_##_name), \
40652b65
MD
62 },
63
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)
68
69#undef TRACE_EVENT_ENUM
70#define TRACE_EVENT_ENUM(_name, _entries...)
71
72#endif /* STAGE_EXPORT_TYPES */
This page took 0.028114 seconds and 4 git commands to generate.