Tracepoint API namespacing '_tp_max_t'
[lttng-ust.git] / include / lttng / ust-tracepoint-event.h
index f4fc0db75af2d6ffaffa42b67a22b9d360c1d60f..5c6b846a3954e219b1fb938b350964afe9a5ca5f 100644 (file)
        LTTNG_UST__TRACEPOINT_EVENT_INSTANCE(_provider, _template, _name, LTTNG_UST__TP_PARAMS(_args))
 
 /* Helpers */
-#define _TP_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#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;   \
        })
 
 /*
@@ -379,7 +379,7 @@ void __event_template_proto___##_provider##___##_name(LTTNG_UST__TP_ARGS_DATA_PR
                .struct_size = sizeof(struct lttng_ust_enum_desc),                      \
                .name = #_provider "_" #_name,                                          \
                .entries = __enum_values__##_provider##_##_name,                        \
-               .nr_entries = _TP_ARRAY_SIZE(__enum_values__##_provider##_##_name) - 1, \
+               .nr_entries = LTTNG_UST__TP_ARRAY_SIZE(__enum_values__##_provider##_##_name) - 1,       \
        };
 
 #include LTTNG_UST_TRACEPOINT_INCLUDE
@@ -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)                                     \
@@ -846,7 +846,7 @@ void __event_probe__##_provider##___##_name(LTTNG_UST__TP_ARGS_DATA_PROTO(_args)
 {                                                                            \
        struct lttng_ust_event_common *__event = (struct lttng_ust_event_common *) __tp_data; \
        size_t __dynamic_len_idx = 0;                                         \
-       const size_t __num_fields = _TP_ARRAY_SIZE(__event_fields___##_provider##___##_name) - 1; \
+       const size_t __num_fields = LTTNG_UST__TP_ARRAY_SIZE(__event_fields___##_provider##___##_name) - 1; \
        union {                                                               \
                size_t __dynamic_len[__num_fields];                           \
                char __interpreter_stack_data[2 * sizeof(unsigned long) * __num_fields]; \
@@ -1062,7 +1062,7 @@ static const struct lttng_ust_event_desc __event_desc___##_provider##_##_name =
        .probe_desc = &__probe_desc___##_provider,                             \
        .probe_callback = (void (*)(void)) &__event_probe__##_provider##___##_template, \
        .fields = __event_fields___##_provider##___##_template,                \
-       .nr_fields = _TP_ARRAY_SIZE(__event_fields___##_provider##___##_template) - 1, \
+       .nr_fields = LTTNG_UST__TP_ARRAY_SIZE(__event_fields___##_provider##___##_template) - 1, \
        .loglevel = &__ref_loglevel___##_provider##___##_name,                 \
        .signature = __tp_event_signature___##_provider##___##_template,       \
        .model_emf_uri = &__ref_model_emf_uri___##_provider##___##_name,       \
@@ -1099,7 +1099,7 @@ const struct lttng_ust_probe_desc LTTNG_UST__TP_COMBINE_TOKENS(__probe_desc___,
        .struct_size = sizeof(struct lttng_ust_probe_desc),
        .provider_name = __tp_stringify(LTTNG_UST_TRACEPOINT_PROVIDER),
        .event_desc = LTTNG_UST__TP_COMBINE_TOKENS(__event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER),
-       .nr_events = _TP_ARRAY_SIZE(LTTNG_UST__TP_COMBINE_TOKENS(__event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER)) - 1,
+       .nr_events = LTTNG_UST__TP_ARRAY_SIZE(LTTNG_UST__TP_COMBINE_TOKENS(__event_desc___, LTTNG_UST_TRACEPOINT_PROVIDER)) - 1,
        .major = LTTNG_UST_PROVIDER_MAJOR,
        .minor = LTTNG_UST_PROVIDER_MINOR,
 };
This page took 0.025792 seconds and 4 git commands to generate.