summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
88c7c4e)
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.
Change-Id: I40ce57d796361cc9393d07792e5c5225a38db00f
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
/* The following declarations must be outside re-inclusion protection. */
/* The following declarations must be outside re-inclusion protection. */
+#ifndef LTTNG_UST_TRACEPOINT_ENUM
/*
* Tracepoint Enumerations
/*
* Tracepoint Enumerations
- * TRACEPOINT_ENUM(someproject_component, enumname,
+ * LTTNG_UST_TRACEPOINT_ENUM(someproject_component, enumname,
* TP_ENUM_VALUES(
* ctf_enum_value("even", 0)
* ctf_enum_value("uneven", 1)
* TP_ENUM_VALUES(
* ctf_enum_value("even", 0)
* ctf_enum_value("uneven", 1)
* ctf_enum(someproject_component, enumname, enumtype, enumfield, enumval)
*
* Where "someproject_component" and "enumname" match those in the
* ctf_enum(someproject_component, enumname, enumtype, enumfield, enumval)
*
* Where "someproject_component" and "enumname" match those in the
- * TRACEPOINT_ENUM, "enumtype" is a signed or unsigned integer type
+ * LTTNG_UST_TRACEPOINT_ENUM, "enumtype" is a signed or unsigned integer type
* backing the enumeration, "enumfield" is the name of the field and
* "enumval" is the value.
*/
* backing the enumeration, "enumfield" is the name of the field and
* "enumval" is the value.
*/
-#define TRACEPOINT_ENUM(provider, name, values)
+#define LTTNG_UST_TRACEPOINT_ENUM(provider, name, values)
-#endif /* #ifndef TRACEPOINT_ENUM */
+#if LTTNG_UST_COMPAT_API(0)
+#define TRACEPOINT_ENUM LTTNG_UST_TRACEPOINT_ENUM
+#endif /* #if LTTNG_UST_COMPAT_API(0) */
+
+#endif /* #ifndef LTTNG_UST_TRACEPOINT_ENUM */
#ifndef LTTNG_UST_TRACEPOINT_EVENT
#ifndef LTTNG_UST_TRACEPOINT_EVENT
#undef LTTNG_UST__TRACEPOINT_EVENT_INSTANCE
#define LTTNG_UST__TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _args)
#undef LTTNG_UST__TRACEPOINT_EVENT_INSTANCE
#define LTTNG_UST__TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, _args)
-#undef TRACEPOINT_ENUM
-#define TRACEPOINT_ENUM(_provider, _name, _values)
+#undef LTTNG_UST_TRACEPOINT_ENUM
+#define LTTNG_UST_TRACEPOINT_ENUM(_provider, _name, _values)
#undef LTTNG_UST_TP_ARGS
#define LTTNG_UST_TP_ARGS(...)
#undef LTTNG_UST_TP_ARGS
#define LTTNG_UST_TP_ARGS(...)
#define TP_ENUM_VALUES(...) \
__VA_ARGS__
#define TP_ENUM_VALUES(...) \
__VA_ARGS__
-#undef TRACEPOINT_ENUM
-#define TRACEPOINT_ENUM(_provider, _name, _values) \
+#undef LTTNG_UST_TRACEPOINT_ENUM
+#define LTTNG_UST_TRACEPOINT_ENUM(_provider, _name, _values) \
const struct lttng_ust_enum_entry * const __enum_values__##_provider##_##_name[] = { \
_values \
ctf_enum_value("", 0) /* Dummy, 0-len array forbidden by C99. */ \
const struct lttng_ust_enum_entry * const __enum_values__##_provider##_##_name[] = { \
_values \
ctf_enum_value("", 0) /* Dummy, 0-len array forbidden by C99. */ \
ctf_integer(int, dummy, 0) /* Dummy, C99 forbids 0-len array. */ \
};
ctf_integer(int, dummy, 0) /* Dummy, C99 forbids 0-len array. */ \
};
-#undef TRACEPOINT_ENUM
-#define TRACEPOINT_ENUM(_provider, _name, _values) \
+#undef LTTNG_UST_TRACEPOINT_ENUM
+#define LTTNG_UST_TRACEPOINT_ENUM(_provider, _name, _values) \
static const struct lttng_ust_enum_desc __enum_##_provider##_##_name = { \
.struct_size = sizeof(struct lttng_ust_enum_desc), \
.name = #_provider "_" #_name, \
static const struct lttng_ust_enum_desc __enum_##_provider##_##_name = { \
.struct_size = sizeof(struct lttng_ust_enum_desc), \
.name = #_provider "_" #_name, \
#include <lttng/tracepoint.h>
#include <lttng/tracepoint.h>
-TRACEPOINT_ENUM(ust_tests_ctf_types, testenum,
+LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ctf_types, testenum,
TP_ENUM_VALUES(
ctf_enum_value("even", 0)
ctf_enum_value("uneven", 1)
TP_ENUM_VALUES(
ctf_enum_value("even", 0)
ctf_enum_value("uneven", 1)
-TRACEPOINT_ENUM(ust_tests_ctf_types, testenum2,
+LTTNG_UST_TRACEPOINT_ENUM(ust_tests_ctf_types, testenum2,
TP_ENUM_VALUES(
ctf_enum_value("zero", 0)
ctf_enum_value("five", 5)
TP_ENUM_VALUES(
ctf_enum_value("zero", 0)
ctf_enum_value("five", 5)
#include <lttng/tracepoint.h>
#include <stddef.h>
#include <lttng/tracepoint.h>
#include <stddef.h>
-TRACEPOINT_ENUM(ust_tests_hello, my_enum,
+LTTNG_UST_TRACEPOINT_ENUM(ust_tests_hello, my_enum,
TP_ENUM_VALUES(
ctf_enum_value("zero", 0)
ctf_enum_value("one", 1)
TP_ENUM_VALUES(
ctf_enum_value("zero", 0)
ctf_enum_value("one", 1)