From: Michael Jeanson Date: Tue, 20 Apr 2021 18:31:00 +0000 (-0400) Subject: Tracepoint API namespacing '__LTTNG_UST_NULL_STRING' X-Git-Tag: v2.13.0-rc1~51 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ee0889a3fd9dcd72275237344b96fdce192f88b7;p=lttng-ust.git Tracepoint API namespacing '__LTTNG_UST_NULL_STRING' 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: I1517464f5c50b890bdcf2825d10be1690a699eac Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 8ba095bd..f4fc0db7 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -18,7 +18,7 @@ #include #include -#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) \ @@ -449,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) \ @@ -615,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 *); \ } @@ -776,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)); \ }