Tracepoint API namespacing '_tp_max_t'
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 20 Apr 2021 18:59:10 +0000 (14:59 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 22 Apr 2021 15:01:18 +0000 (11:01 -0400)
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: I3f80c5a299e537897d9f0dd3e48ce2c1ccf68c30
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/ust-tracepoint-event.h

index a37897cfbcde1e1571261917d797393b1af1a79c..5c6b846a3954e219b1fb938b350964afe9a5ca5f 100644 (file)
 /* Helpers */
 #define LTTNG_UST__TP_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
 
-#define _tp_max_t(type, x, y)                          \
+#define lttng_ust__tp_max_t(type, x, y)                        \
        ({                                              \
-               type __max1 = (x);                      \
-               type __max2 = (y);                      \
-               __max1 > __max2 ? __max1: __max2;       \
+               type lttng_ust__max1 = (x);             \
+               type lttng_ust__max2 = (y);             \
+               lttng_ust__max1 > lttng_ust__max2 ? lttng_ust__max1: lttng_ust__max2;   \
        })
 
 /*
@@ -665,20 +665,20 @@ void __event_prepare_interpreter_stack__##_provider##___##_name(char *__stack_da
 #define _ctf_integer_ext(_type, _item, _src, _byte_order, _base, _nowrite)     \
        if (0)                                                                 \
                (void) (_src);  /* Unused */                                   \
-       __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
+       __event_align = lttng_ust__tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
 
 #undef _ctf_float
 #define _ctf_float(_type, _item, _src, _nowrite)                              \
        if (0)                                                                 \
                (void) (_src);  /* Unused */                                   \
-       __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
+       __event_align = lttng_ust__tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
 
 #undef _ctf_array_encoded
 #define _ctf_array_encoded(_type, _item, _src, _byte_order, _length,          \
                        _encoding, _nowrite, _elem_type_base)                  \
        if (0)                                                                 \
                (void) (_src);  /* Unused */                                   \
-       __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
+       __event_align = lttng_ust__tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
 
 #undef _ctf_sequence_encoded
 #define _ctf_sequence_encoded(_type, _item, _src, _byte_order, _length_type,   \
@@ -687,8 +687,8 @@ void __event_prepare_interpreter_stack__##_provider##___##_name(char *__stack_da
                (void) (_src);  /* Unused */                                   \
        if (0)                                                                 \
                (void) (_src_length);   /* Unused */                           \
-       __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_length_type));     \
-       __event_align = _tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
+       __event_align = lttng_ust__tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_length_type));   \
+       __event_align = lttng_ust__tp_max_t(size_t, __event_align, lttng_ust_rb_alignof(_type));
 
 #undef _ctf_string
 #define _ctf_string(_item, _src, _nowrite)                                     \
This page took 0.026099 seconds and 4 git commands to generate.