Tracepoint API namespacing ust-endian
[lttng-ust.git] / include / lttng / ust-tracepoint-event.h
index 996750c7ad7f0fab0ca93957fcedd75a6d28309e..fb5d065456d47dea5615f9fe3cbacba2819105bc 100644 (file)
@@ -306,7 +306,7 @@ void lttng_ust__event_template_proto___##_provider##___##_name(LTTNG_UST__TP_ARG
        LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, { \
                .struct_size = sizeof(struct lttng_ust_event_field), \
                .name = "_" #_item "_length",                   \
-               .type = lttng_ust_type_integer_define(_length_type, BYTE_ORDER, 10), \
+               .type = lttng_ust_type_integer_define(_length_type, LTTNG_UST_BYTE_ORDER, 10), \
                .nowrite = _nowrite,                            \
                .nofilter = 1,                                  \
        }),                                                     \
@@ -357,7 +357,7 @@ void lttng_ust__event_template_proto___##_provider##___##_name(LTTNG_UST__TP_ARG
                        },                                      \
                        .struct_size = sizeof(struct lttng_ust_type_enum), \
                        .desc = &__enum_##_provider##_##_name, \
-                       .container_type = lttng_ust_type_integer_define(_type, BYTE_ORDER, 10), \
+                       .container_type = lttng_ust_type_integer_define(_type, LTTNG_UST_BYTE_ORDER, 10), \
                }),                                             \
                .nowrite = _nowrite,                            \
                .nofilter = 0,                                  \
@@ -458,7 +458,7 @@ static void lttng_ust__event_probe__##_provider##___##_name(LTTNG_UST__TP_ARGS_D
 
 #undef _ctf_enum
 #define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite)              \
-       _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, _nowrite)
+       _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite)
 
 #undef LTTNG_UST_TP_ARGS
 #define LTTNG_UST_TP_ARGS(...) __VA_ARGS__
@@ -514,24 +514,24 @@ size_t lttng_ust__event_get_size__##_provider##___##_name(                              \
                case 2:                                                        \
                {                                                              \
                        union { _type t; int16_t v; } __tmp = { (_type) (_src) }; \
-                       if (_byte_order != BYTE_ORDER)                         \
-                               __tmp.v = bswap_16(__tmp.v);                   \
+                       if (_byte_order != LTTNG_UST_BYTE_ORDER)                               \
+                               __tmp.v = lttng_ust_bswap_16(__tmp.v);                 \
                        __ctf_tmp_int64 = (int64_t) __tmp.v;                   \
                        break;                                                 \
                }                                                              \
                case 4:                                                        \
                {                                                              \
                        union { _type t; int32_t v; } __tmp = { (_type) (_src) }; \
-                       if (_byte_order != BYTE_ORDER)                         \
-                               __tmp.v = bswap_32(__tmp.v);                   \
+                       if (_byte_order != LTTNG_UST_BYTE_ORDER)                               \
+                               __tmp.v = lttng_ust_bswap_32(__tmp.v);                 \
                        __ctf_tmp_int64 = (int64_t) __tmp.v;                   \
                        break;                                                 \
                }                                                              \
                case 8:                                                        \
                {                                                              \
                        union { _type t; int64_t v; } __tmp = { (_type) (_src) }; \
-                       if (_byte_order != BYTE_ORDER)                         \
-                               __tmp.v = bswap_64(__tmp.v);                   \
+                       if (_byte_order != LTTNG_UST_BYTE_ORDER)                               \
+                               __tmp.v = lttng_ust_bswap_64(__tmp.v);                 \
                        __ctf_tmp_int64 = (int64_t) __tmp.v;                   \
                        break;                                                 \
                }                                                              \
@@ -551,24 +551,24 @@ size_t lttng_ust__event_get_size__##_provider##___##_name(                              \
                case 2:                                                        \
                {                                                              \
                        union { _type t; uint16_t v; } __tmp = { (_type) (_src) }; \
-                       if (_byte_order != BYTE_ORDER)                         \
-                               __tmp.v = bswap_16(__tmp.v);                   \
+                       if (_byte_order != LTTNG_UST_BYTE_ORDER)                               \
+                               __tmp.v = lttng_ust_bswap_16(__tmp.v);                 \
                        __ctf_tmp_uint64 = (uint64_t) __tmp.v;                 \
                        break;                                                 \
                }                                                              \
                case 4:                                                        \
                {                                                              \
                        union { _type t; uint32_t v; } __tmp = { (_type) (_src) }; \
-                       if (_byte_order != BYTE_ORDER)                         \
-                               __tmp.v = bswap_32(__tmp.v);                   \
+                       if (_byte_order != LTTNG_UST_BYTE_ORDER)                               \
+                               __tmp.v = lttng_ust_bswap_32(__tmp.v);                 \
                        __ctf_tmp_uint64 = (uint64_t) __tmp.v;                 \
                        break;                                                 \
                }                                                              \
                case 8:                                                        \
                {                                                              \
                        union { _type t; uint64_t v; } __tmp = { (_type) (_src) }; \
-                       if (_byte_order != BYTE_ORDER)                         \
-                               __tmp.v = bswap_64(__tmp.v);                   \
+                       if (_byte_order != LTTNG_UST_BYTE_ORDER)                               \
+                               __tmp.v = lttng_ust_bswap_64(__tmp.v);                 \
                        __ctf_tmp_uint64 = (uint64_t) __tmp.v;                 \
                        break;                                                 \
                }                                                              \
@@ -627,7 +627,7 @@ size_t lttng_ust__event_get_size__##_provider##___##_name(                        \
 
 #undef _ctf_enum
 #define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite)              \
-       _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, _nowrite)
+       _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite)
 
 #undef LTTNG_UST_TP_ARGS
 #define LTTNG_UST_TP_ARGS(...) __VA_ARGS__
@@ -702,7 +702,7 @@ void lttng_ust__event_prepare_interpreter_stack__##_provider##___##_name(char *_
 
 #undef _ctf_enum
 #define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite)              \
-       _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, _nowrite)
+       _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite)
 
 #undef LTTNG_UST_TP_ARGS
 #define LTTNG_UST_TP_ARGS(...) __VA_ARGS__
@@ -786,7 +786,7 @@ size_t lttng_ust__event_get_align__##_provider##___##_name(LTTNG_UST__TP_ARGS_PR
 
 #undef _ctf_enum
 #define _ctf_enum(_provider, _name, _type, _item, _src, _nowrite)      \
-       _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, _nowrite)
+       _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, _nowrite)
 
 /* Beware: this get len actually consumes the len value */
 #undef lttng_ust__get_dynamic_len
@@ -1106,7 +1106,7 @@ const struct lttng_ust_probe_desc LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__probe_
 };
 
 static int LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__probe_register_refcount___, LTTNG_UST_TRACEPOINT_PROVIDER);
-static struct lttng_ust_registered_probe *LTTNG_UST__TP_COMBINE_TOKENS(__lttng_ust_probe_register_cookie___, LTTNG_UST_TRACEPOINT_PROVIDER);
+static struct lttng_ust_registered_probe *LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__probe_register_cookie___, LTTNG_UST_TRACEPOINT_PROVIDER);
 
 /*
  * Stage 9 of tracepoint event generation.
@@ -1122,10 +1122,10 @@ static struct lttng_ust_registered_probe *LTTNG_UST__TP_COMBINE_TOKENS(__lttng_u
 /* Reset all macros within LTTNG_UST_TRACEPOINT_EVENT */
 #include <lttng/ust-tracepoint-event-reset.h>
 static void
-LTTNG_UST__TP_COMBINE_TOKENS(__lttng_ust_events_init__, LTTNG_UST_TRACEPOINT_PROVIDER)(void)
+LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__events_init__, LTTNG_UST_TRACEPOINT_PROVIDER)(void)
        lttng_ust_notrace __attribute__((constructor));
 static void
-LTTNG_UST__TP_COMBINE_TOKENS(__lttng_ust_events_init__, LTTNG_UST_TRACEPOINT_PROVIDER)(void)
+LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__events_init__, LTTNG_UST_TRACEPOINT_PROVIDER)(void)
 {
        struct lttng_ust_registered_probe *reg_probe;
 
@@ -1142,27 +1142,27 @@ LTTNG_UST__TP_COMBINE_TOKENS(__lttng_ust_events_init__, LTTNG_UST_TRACEPOINT_PRO
         * error will appear.
         */
        LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust_tracepoint_provider_check_, LTTNG_UST_TRACEPOINT_PROVIDER)();
-       assert(!LTTNG_UST__TP_COMBINE_TOKENS(__lttng_ust_probe_register_cookie___, LTTNG_UST_TRACEPOINT_PROVIDER));
+       assert(!LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__probe_register_cookie___, LTTNG_UST_TRACEPOINT_PROVIDER));
        reg_probe = lttng_ust_probe_register(&LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__probe_desc___, LTTNG_UST_TRACEPOINT_PROVIDER));
        if (!reg_probe) {
                fprintf(stderr, "LTTng-UST: Error while registering tracepoint probe.\n");
                abort();
        }
-       LTTNG_UST__TP_COMBINE_TOKENS(__lttng_ust_probe_register_cookie___, LTTNG_UST_TRACEPOINT_PROVIDER) = reg_probe;
+       LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__probe_register_cookie___, LTTNG_UST_TRACEPOINT_PROVIDER) = reg_probe;
 }
 
 static void
-LTTNG_UST__TP_COMBINE_TOKENS(__lttng_ust_events_exit__, LTTNG_UST_TRACEPOINT_PROVIDER)(void)
+LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__events_exit__, LTTNG_UST_TRACEPOINT_PROVIDER)(void)
        lttng_ust_notrace __attribute__((destructor));
 static void
-LTTNG_UST__TP_COMBINE_TOKENS(__lttng_ust_events_exit__, LTTNG_UST_TRACEPOINT_PROVIDER)(void)
+LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__events_exit__, LTTNG_UST_TRACEPOINT_PROVIDER)(void)
 {
        if (--LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__probe_register_refcount___,
                        LTTNG_UST_TRACEPOINT_PROVIDER)) {
                return;
        }
-       lttng_ust_probe_unregister(LTTNG_UST__TP_COMBINE_TOKENS(__lttng_ust_probe_register_cookie___, LTTNG_UST_TRACEPOINT_PROVIDER));
-       LTTNG_UST__TP_COMBINE_TOKENS(__lttng_ust_probe_register_cookie___, LTTNG_UST_TRACEPOINT_PROVIDER) = NULL;
+       lttng_ust_probe_unregister(LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__probe_register_cookie___, LTTNG_UST_TRACEPOINT_PROVIDER));
+       LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust__probe_register_cookie___, LTTNG_UST_TRACEPOINT_PROVIDER) = NULL;
 }
 
 int LTTNG_UST__TP_COMBINE_TOKENS(lttng_ust_tracepoint_provider_, LTTNG_UST_TRACEPOINT_PROVIDER)
This page took 0.027085 seconds and 4 git commands to generate.