Tracepoint API namespacing '__LTTNG_UST_NULL_STRING'
[lttng-ust.git] / include / lttng / ust-tracepoint-event.h
index 6aa905baf2cb5935ac2137f1ca1349774ea3eaf1..f4fc0db75af2d6ffaffa42b67a22b9d360c1d60f 100644 (file)
 #include <lttng/ust-compiler.h>
 #include <lttng/tracepoint.h>
 #include <lttng/ust-endian.h>
+#include <lttng/ust-api-compat.h>
 #include <string.h>
 
-#define __LTTNG_UST_NULL_STRING        "(null)"
+#define LTTNG_UST__NULL_STRING "(null)"
 
 #undef tp_list_for_each_entry_rcu
 #define tp_list_for_each_entry_rcu(pos, head, member)  \
@@ -197,10 +198,15 @@ void __event_template_proto___##_provider##___##_name(LTTNG_UST__TP_ARGS_DATA_PR
                .options = LTTNG_UST_ENUM_ENTRY_OPTION_IS_AUTO,         \
        }),
 
-#undef TP_ENUM_VALUES
-#define TP_ENUM_VALUES(...)                                            \
+#undef LTTNG_UST_TP_ENUM_VALUES
+#define LTTNG_UST_TP_ENUM_VALUES(...)                                          \
        __VA_ARGS__
 
+#if LTTNG_UST_COMPAT_API(0)
+# undef TP_ENUM_VALUES
+# define TP_ENUM_VALUES LTTNG_UST_TP_ENUM_VALUES
+#endif /* #if LTTNG_UST_COMPAT_API(0) */
+
 #undef LTTNG_UST_TRACEPOINT_ENUM
 #define LTTNG_UST_TRACEPOINT_ENUM(_provider, _name, _values)                   \
        const struct lttng_ust_enum_entry * const __enum_values__##_provider##_##_name[] = { \
@@ -443,7 +449,7 @@ static void __event_probe__##_provider##___##_name(LTTNG_UST__TP_ARGS_DATA_PROTO
 #undef _ctf_string
 #define _ctf_string(_item, _src, _nowrite)                                    \
        __event_len += __dynamic_len[__dynamic_len_idx++] =                    \
-               strlen((_src) ? (_src) : __LTTNG_UST_NULL_STRING) + 1;
+               strlen((_src) ? (_src) : LTTNG_UST__NULL_STRING) + 1;
 
 #undef _ctf_unused
 #define _ctf_unused(_src)                                                      \
@@ -609,7 +615,7 @@ size_t __event_get_size__##_provider##___##_name(                         \
 #define _ctf_string(_item, _src, _nowrite)                                    \
        {                                                                      \
                const void *__ctf_tmp_ptr =                                    \
-                       ((_src) ? (_src) : __LTTNG_UST_NULL_STRING);           \
+                       ((_src) ? (_src) : LTTNG_UST__NULL_STRING);            \
                memcpy(__stack_data, &__ctf_tmp_ptr, sizeof(void *));          \
                __stack_data += sizeof(void *);                                \
        }
@@ -770,7 +776,7 @@ size_t __event_get_align__##_provider##___##_name(LTTNG_UST__TP_ARGS_PROTO(_args
 #define _ctf_string(_item, _src, _nowrite)                                     \
        {                                                                       \
                const char *__ctf_tmp_string =                                  \
-                       ((_src) ? (_src) : __LTTNG_UST_NULL_STRING);            \
+                       ((_src) ? (_src) : LTTNG_UST__NULL_STRING);             \
                __chan->ops->event_strcpy(&__ctx, __ctf_tmp_string,             \
                        __get_dynamic_len(dest));                               \
        }
This page took 0.024313 seconds and 4 git commands to generate.