Tracepoint API namespacing ust-endian
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 21 Apr 2021 16:42:21 +0000 (12:42 -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: Iaab4a3630f3cd75adf540e4e849fb374076d87b4
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
34 files changed:
include/lttng/ust-endian.h
include/lttng/ust-events.h
include/lttng/ust-tracepoint-event-nowrite.h
include/lttng/ust-tracepoint-event-write.h
include/lttng/ust-tracepoint-event.h
src/common/bitfield.h
src/common/elf.c
src/common/elf.h
src/common/events.h
src/common/jhash.h
src/lib/lttng-ust-ctl/ustctl.c
src/lib/lttng-ust/event-notifier-notification.c
src/lib/lttng-ust/lttng-bytecode-interpreter.c
src/lib/lttng-ust/lttng-context-cgroup-ns.c
src/lib/lttng-ust/lttng-context-cpu-id.c
src/lib/lttng-ust/lttng-context-ip.c
src/lib/lttng-ust/lttng-context-ipc-ns.c
src/lib/lttng-ust/lttng-context-mnt-ns.c
src/lib/lttng-ust/lttng-context-net-ns.c
src/lib/lttng-ust/lttng-context-perf-counters.c
src/lib/lttng-ust/lttng-context-pid-ns.c
src/lib/lttng-ust/lttng-context-pthread-id.c
src/lib/lttng-ust/lttng-context-time-ns.c
src/lib/lttng-ust/lttng-context-user-ns.c
src/lib/lttng-ust/lttng-context-uts-ns.c
src/lib/lttng-ust/lttng-context-vegid.c
src/lib/lttng-ust/lttng-context-veuid.c
src/lib/lttng-ust/lttng-context-vgid.c
src/lib/lttng-ust/lttng-context-vpid.c
src/lib/lttng-ust/lttng-context-vsgid.c
src/lib/lttng-ust/lttng-context-vsuid.c
src/lib/lttng-ust/lttng-context-vtid.c
src/lib/lttng-ust/lttng-context-vuid.c
src/lib/lttng-ust/lttng-ust-dynamic-type.c

index 06f8236407658ca5e3d1e525d631c3bd2097d2d4..7f1d79f59be744e0867048ea6320d5b664f441a9 100644 (file)
 #if (defined(__linux__) || defined(__CYGWIN__))
 #include <endian.h>
 #include <byteswap.h>
-#elif defined(__FreeBSD__)
-#include <sys/endian.h>
-#define bswap_16(x)    bswap16(x)
-#define bswap_32(x)    bswap32(x)
-#define bswap_64(x)    bswap64(x)
-#else
-#error "Please add support for your OS."
-#endif
 
-/*
- * BYTE_ORDER, LITTLE_ENDIAN, and BIG_ENDIAN are only defined on Linux
- * if __USE_BSD is defined. Force their definition.
- */
-#ifndef BYTE_ORDER
-#define BYTE_ORDER __BYTE_ORDER
-#endif
+#define lttng_ust_bswap_16(x)          bswap_16(x)
+#define lttng_ust_bswap_32(x)          bswap_32(x)
+#define lttng_ust_bswap_64(x)          bswap_64(x)
 
-#ifndef LITTLE_ENDIAN
-#define LITTLE_ENDIAN __LITTLE_ENDIAN
-#endif
-
-#ifndef BIG_ENDIAN
-#define BIG_ENDIAN __BIG_ENDIAN
-#endif
+#define LTTNG_UST_BYTE_ORDER           __BYTE_ORDER
+#define LTTNG_UST_LITTLE_ENDIAN                __LITTLE_ENDIAN
+#define LTTNG_UST_BIG_ENDIAN           __BIG_ENDIAN
 
-#ifndef FLOAT_WORD_ORDER
 #ifdef __FLOAT_WORD_ORDER
-#define FLOAT_WORD_ORDER       __FLOAT_WORD_ORDER
+#define LTTNG_UST_FLOAT_WORD_ORDER     __FLOAT_WORD_ORDER
 #else /* __FLOAT_WORD_ORDER */
-#define FLOAT_WORD_ORDER       BYTE_ORDER
+#define LTTNG_UST_FLOAT_WORD_ORDER     __BYTE_ORDER
 #endif /* __FLOAT_WORD_ORDER */
-#endif /* FLOAT_WORD_ORDER */
+
+#elif defined(__FreeBSD__)
+
+#include <sys/endian.h>
+
+#define lttng_ust_bswap_16(x)          bswap16(x)
+#define lttng_ust_bswap_32(x)          bswap32(x)
+#define lttng_ust_bswap_64(x)          bswap64(x)
+
+#define LTTNG_UST_BYTE_ORDER           BYTE_ORDER
+#define LTTNG_UST_LITTLE_ENDIAN                LITTLE_ENDIAN
+#define LTTNG_UST_BIG_ENDIAN           BIG_ENDIAN
+#define FLOAT_WORD_ORDER               BYTE_ORDER
+
+#else
+#error "Please add support for your OS."
+#endif
 
 #endif /* _LTTNG_UST_ENDIAN_H */
index cf1045bb589470d5a1f53f13369b14fb5c5e987c..5e94bafeb567789e827a1abfc6e35abe01dd38c7 100644 (file)
@@ -125,7 +125,7 @@ struct lttng_ust_type_integer {
                .size = sizeof(_type) * CHAR_BIT,                       \
                .alignment = lttng_ust_rb_alignof(_type) * CHAR_BIT,    \
                .signedness = lttng_ust_is_signed_type(_type),          \
-               .reverse_byte_order = _byte_order != BYTE_ORDER,        \
+               .reverse_byte_order = _byte_order != LTTNG_UST_BYTE_ORDER,      \
                .base = _base,                                          \
        }))
 
@@ -157,7 +157,7 @@ struct lttng_ust_type_float {
                        - lttng_ust_float_mant_dig(_type),              \
                .mant_dig = lttng_ust_float_mant_dig(_type),            \
                .alignment = lttng_ust_rb_alignof(_type) * CHAR_BIT,    \
-               .reverse_byte_order = BYTE_ORDER != FLOAT_WORD_ORDER,   \
+               .reverse_byte_order = LTTNG_UST_BYTE_ORDER != LTTNG_UST_FLOAT_WORD_ORDER,       \
        }))
 
 
index 3193d7025133a59a89d4f23b6ae059ad70ae0e46..7ee01e3817026da510532fa81a673dfc3d285e08 100644 (file)
@@ -6,7 +6,7 @@
 
 #undef ctf_integer_nowrite
 #define ctf_integer_nowrite(_type, _item, _src)                        \
-       _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, 1)
+       _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, 1)
 
 #undef ctf_float_nowrite
 #define ctf_float_nowrite(_type, _item, _src)                  \
 
 #undef ctf_array_nowrite
 #define ctf_array_nowrite(_type, _item, _src, _length)         \
-       _ctf_array_encoded(_type, _item, _src, BYTE_ORDER, _length, none, 1, 10)
+       _ctf_array_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER, _length, none, 1, 10)
 
 #undef ctf_array_nowrite_hex
 #define ctf_array_nowrite_hex(_type, _item, _src, _length)     \
-       _ctf_array_encoded(_type, _item, _src, BYTE_ORDER, _length, none, 1, 16)
+       _ctf_array_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER, _length, none, 1, 16)
 
 #undef ctf_array_network_nowrite
 #define ctf_array_network_nowrite(_type, _item, _src, _length) \
-       _ctf_array_encoded(_type, _item, _src, BIG_ENDIAN,      \
+       _ctf_array_encoded(_type, _item, _src, LTTNG_UST_BIG_ENDIAN,    \
                        _length, none, 1, 10)
 
 #undef ctf_array_network_nowrite_hex
 #define ctf_array_network_nowrite_hex(_type, _item, _src, _length) \
-       _ctf_array_encoded(_type, _item, _src, BIG_ENDIAN,      \
+       _ctf_array_encoded(_type, _item, _src, LTTNG_UST_BIG_ENDIAN,    \
                        _length, none, 1, 16)
 
 #undef ctf_array_text_nowrite
 #define ctf_array_text_nowrite(_type, _item, _src, _length)    \
-       _ctf_array_encoded(_type, _item, _src, BYTE_ORDER, _length, UTF8, 1, 10)
+       _ctf_array_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER, _length, UTF8, 1, 10)
 
 #undef ctf_sequence_nowrite
 #define ctf_sequence_nowrite(_type, _item, _src, _length_type, _src_length) \
-       _ctf_sequence_encoded(_type, _item, _src, BYTE_ORDER,   \
+       _ctf_sequence_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER, \
                        _length_type, _src_length, none, 1, 10)
 
 #undef ctf_sequence_nowrite_hex
 #define ctf_sequence_nowrite_hex(_type, _item, _src, _length_type, _src_length) \
-       _ctf_sequence_encoded(_type, _item, _src, BYTE_ORDER,   \
+       _ctf_sequence_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER, \
                        _length_type, _src_length, none, 1, 16)
 
 #undef ctf_sequence_network_nowrite
 #define ctf_sequence_network_nowrite(_type, _item, _src, _length_type, _src_length) \
-       _ctf_sequence_encoded(_type, _item, _src, BIG_ENDIAN,   \
+       _ctf_sequence_encoded(_type, _item, _src, LTTNG_UST_BIG_ENDIAN, \
                        _length_type, _src_length, none, 1, 10)
 
 #undef ctf_sequence_network_nowrite_hex
 #define ctf_sequence_network_nowrite_hex(_type, _item, _src, _length_type, _src_length) \
-       _ctf_sequence_encoded(_type, _item, _src, BIG_ENDIAN,   \
+       _ctf_sequence_encoded(_type, _item, _src, LTTNG_UST_BIG_ENDIAN, \
                        _length_type, _src_length, none, 1, 16)
 
 #undef ctf_sequence_text_nowrite
 #define ctf_sequence_text_nowrite(_type, _item, _src, _length_type, _src_length) \
-       _ctf_sequence_encoded(_type, _item, _src, BYTE_ORDER,   \
+       _ctf_sequence_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER, \
                        _length_type, _src_length, UTF8, 1, 10)
 
 #undef ctf_string_nowrite
index 87f621cd47dfe5918db92fd7736dd6042c3de1f1..6e7e6ceb07ce7fb52b16cdfd640aa55cb56e5ab2 100644 (file)
@@ -6,19 +6,19 @@
 
 #undef ctf_integer
 #define ctf_integer(_type, _item, _src)                                \
-       _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 10, 0)
+       _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 10, 0)
 
 #undef ctf_integer_hex
 #define ctf_integer_hex(_type, _item, _src)                    \
-       _ctf_integer_ext(_type, _item, _src, BYTE_ORDER, 16, 0)
+       _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BYTE_ORDER, 16, 0)
 
 #undef ctf_integer_network
 #define ctf_integer_network(_type, _item, _src)                        \
-       _ctf_integer_ext(_type, _item, _src, BIG_ENDIAN, 10, 0)
+       _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BIG_ENDIAN, 10, 0)
 
 #undef ctf_integer_network_hex
 #define ctf_integer_network_hex(_type, _item, _src)            \
-       _ctf_integer_ext(_type, _item, _src, BIG_ENDIAN, 16, 0)
+       _ctf_integer_ext(_type, _item, _src, LTTNG_UST_BIG_ENDIAN, 16, 0)
 
 #undef ctf_float
 #define ctf_float(_type, _item, _src)                          \
 
 #undef ctf_array
 #define ctf_array(_type, _item, _src, _length)                 \
-       _ctf_array_encoded(_type, _item, _src, BYTE_ORDER,      \
+       _ctf_array_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER,    \
                        _length, none, 0, 10)
 
 #undef ctf_array_hex
 #define ctf_array_hex(_type, _item, _src, _length)             \
-       _ctf_array_encoded(_type, _item, _src, BYTE_ORDER,      \
+       _ctf_array_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER,    \
                        _length, none, 0, 16)
 
 #undef ctf_array_network
 #define ctf_array_network(_type, _item, _src, _length) \
-       _ctf_array_encoded(_type, _item, _src, BIG_ENDIAN,      \
+       _ctf_array_encoded(_type, _item, _src, LTTNG_UST_BIG_ENDIAN,    \
                        _length, none, 0, 10)
 
 #undef ctf_array_network_hex
 #define ctf_array_network_hex(_type, _item, _src, _length)     \
-       _ctf_array_encoded(_type, _item, _src, BIG_ENDIAN,      \
+       _ctf_array_encoded(_type, _item, _src, LTTNG_UST_BIG_ENDIAN,    \
                        _length, none, 0, 16)
 
 #undef ctf_array_text
 #define ctf_array_text(_type, _item, _src, _length)            \
-       _ctf_array_encoded(_type, _item, _src, BYTE_ORDER,      \
+       _ctf_array_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER,    \
                        _length, UTF8, 0, 10)
 
 #undef ctf_sequence
 #define ctf_sequence(_type, _item, _src, _length_type, _src_length) \
-       _ctf_sequence_encoded(_type, _item, _src, BYTE_ORDER,   \
+       _ctf_sequence_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER, \
                        _length_type, _src_length, none, 0, 10)
 
 #undef ctf_sequence_hex
 #define ctf_sequence_hex(_type, _item, _src, _length_type, _src_length) \
-       _ctf_sequence_encoded(_type, _item, _src, BYTE_ORDER,   \
+       _ctf_sequence_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER, \
                        _length_type, _src_length, none, 0, 16)
 
 #undef ctf_sequence_network
 #define ctf_sequence_network(_type, _item, _src, _length_type, _src_length) \
-       _ctf_sequence_encoded(_type, _item, _src, BIG_ENDIAN,   \
+       _ctf_sequence_encoded(_type, _item, _src, LTTNG_UST_BIG_ENDIAN, \
                        _length_type, _src_length, none, 0, 10)
 
 #undef ctf_sequence_network_hex
 #define ctf_sequence_network_hex(_type, _item, _src, _length_type, _src_length) \
-       _ctf_sequence_encoded(_type, _item, _src, BIG_ENDIAN,   \
+       _ctf_sequence_encoded(_type, _item, _src, LTTNG_UST_BIG_ENDIAN, \
                        _length_type, _src_length, none, 0, 16)
 
 #undef ctf_sequence_text
 #define ctf_sequence_text(_type, _item, _src, _length_type, _src_length) \
-       _ctf_sequence_encoded(_type, _item, _src, BYTE_ORDER,   \
+       _ctf_sequence_encoded(_type, _item, _src, LTTNG_UST_BYTE_ORDER, \
                        _length_type, _src_length, UTF8, 0, 10)
 
 #undef ctf_string
index 10b47b2cb73dc4ea3c14b124d502bf7886f68eff..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
index 7cb5b32d1eca8f612877449d584fcf57de9e6980..63ae1efdf540e1421dc1defaceeaa1780b7ba69b 100644 (file)
@@ -10,7 +10,7 @@
 #include <stdint.h>    /* C99 5.2.4.2 Numerical limits */
 #include <limits.h>    /* C99 5.2.4.2 Numerical limits */
 #include <stdbool.h>   /* C99 7.16 bool type */
-#include <lttng/ust-endian.h>  /* Non-standard BIG_ENDIAN, LITTLE_ENDIAN, BYTE_ORDER */
+#include <lttng/ust-endian.h>  /* Non-standard LTTNG_UST_BIG_ENDIAN, LTTNG_UST_LITTLE_ENDIAN, LTTNG_UST_BYTE_ORDER */
 
 /*
  * This header strictly follows the C99 standard, except for use of the
@@ -310,7 +310,7 @@ do {                                                                        \
  * bt_bitfield_write_be - write integer to a bitfield in big endian
  */
 
-#if (BYTE_ORDER == LITTLE_ENDIAN)
+#if (LTTNG_UST_BYTE_ORDER == LTTNG_UST_LITTLE_ENDIAN)
 
 #define bt_bitfield_write(ptr, type, start, length, v)                 \
        _bt_bitfield_write_le(ptr, type, start, length, v)
@@ -321,7 +321,7 @@ do {                                                                        \
 #define bt_bitfield_write_be(ptr, type, start, length, v)              \
        _bt_bitfield_write_be(ptr, unsigned char, start, length, v)
 
-#elif (BYTE_ORDER == BIG_ENDIAN)
+#elif (LTTNG_UST_BYTE_ORDER == LTTNG_UST_BIG_ENDIAN)
 
 #define bt_bitfield_write(ptr, type, start, length, v)                 \
        _bt_bitfield_write_be(ptr, type, start, length, v)
@@ -332,7 +332,7 @@ do {                                                                        \
 #define bt_bitfield_write_be(ptr, type, start, length, v)              \
        _bt_bitfield_write_be(ptr, type, start, length, v)
 
-#else /* (BYTE_ORDER == PDP_ENDIAN) */
+#else /* (LTTNG_UST_BYTE_ORDER == PDP_ENDIAN) */
 
 #error "Byte order not supported"
 
@@ -478,7 +478,7 @@ do {                                                                        \
  * bt_bitfield_read_be - read integer from a bitfield in big endian
  */
 
-#if (BYTE_ORDER == LITTLE_ENDIAN)
+#if (LTTNG_UST_BYTE_ORDER == LTTNG_UST_LITTLE_ENDIAN)
 
 #define bt_bitfield_read(ptr, type, start, length, vptr)               \
        _bt_bitfield_read_le(ptr, type, start, length, vptr)
@@ -489,7 +489,7 @@ do {                                                                        \
 #define bt_bitfield_read_be(ptr, type, start, length, vptr)            \
        _bt_bitfield_read_be(ptr, unsigned char, start, length, vptr)
 
-#elif (BYTE_ORDER == BIG_ENDIAN)
+#elif (LTTNG_UST_BYTE_ORDER == LTTNG_UST_BIG_ENDIAN)
 
 #define bt_bitfield_read(ptr, type, start, length, vptr)               \
        _bt_bitfield_read_be(ptr, type, start, length, vptr)
@@ -500,7 +500,7 @@ do {                                                                        \
 #define bt_bitfield_read_be(ptr, type, start, length, vptr)            \
        _bt_bitfield_read_be(ptr, type, start, length, vptr)
 
-#else /* (BYTE_ORDER == PDP_ENDIAN) */
+#else /* (LTTNG_UST_BYTE_ORDER == PDP_ENDIAN) */
 
 #error "Byte order not supported"
 
index b418176bcd7b901417c41a5ce23bedc0ef77d6ea..cec100520e49377553bc03797dd79aab0394be6d 100644 (file)
@@ -456,9 +456,9 @@ int lttng_ust_elf_get_build_id_from_segment(
                }
 
                if (!is_elf_native_endian(elf)) {
-                       nhdr.n_namesz = bswap_32(nhdr.n_namesz);
-                       nhdr.n_descsz = bswap_32(nhdr.n_descsz);
-                       nhdr.n_type = bswap_32(nhdr.n_type);
+                       nhdr.n_namesz = lttng_ust_bswap_32(nhdr.n_namesz);
+                       nhdr.n_descsz = lttng_ust_bswap_32(nhdr.n_descsz);
+                       nhdr.n_type = lttng_ust_bswap_32(nhdr.n_type);
                }
 
                offset += sizeof(nhdr) + nhdr.n_namesz;
@@ -629,7 +629,7 @@ int lttng_ust_elf_get_debug_link_from_section(struct lttng_ust_elf *elf,
                goto error;
        }
        if (!is_elf_native_endian(elf)) {
-               _crc = bswap_32(_crc);
+               _crc = lttng_ust_bswap_32(_crc);
        }
 
 end:
index 17f946768c376143b8b87be53cce8596c1bc5b2e..9a6b298482528340bee691654e5a61cb5ca79b3e 100644 (file)
@@ -74,7 +74,7 @@ struct lttng_ust_elf {
  * Determine native endianness in order to convert when reading an ELF
  * file if there is a mismatch.
  */
-#if BYTE_ORDER == LITTLE_ENDIAN
+#if LTTNG_UST_BYTE_ORDER == LTTNG_UST_LITTLE_ENDIAN
 #define NATIVE_ELF_ENDIANNESS ELFDATA2LSB
 #else
 #define NATIVE_ELF_ENDIANNESS ELFDATA2MSB
@@ -100,13 +100,13 @@ struct lttng_ust_elf {
        do {                                    \
                switch (sizeof(x)) {            \
                case 8:                         \
-                       x = bswap_64(x);        \
+                       x = lttng_ust_bswap_64(x);      \
                        break;                  \
                case 4:                         \
-                       x = bswap_32(x);        \
+                       x = lttng_ust_bswap_32(x);      \
                        break;                  \
                case 2:                         \
-                       x = bswap_16(x);        \
+                       x = lttng_ust_bswap_16(x);      \
                        break;                  \
                case 1:                         \
                        break;                  \
index e827f71df36c9cccf39025f34fcd4f9757245185..5fdec87092074907492398d15c0eb03405158c1c 100644 (file)
@@ -514,7 +514,7 @@ const struct lttng_ust_type_struct *lttng_ust_get_type_struct(const struct lttng
                .size = (_size),                                                                        \
                .alignment = (_alignment),                                                              \
                .signedness = (_signedness),                                                            \
-               .reverse_byte_order = (_byte_order) != BYTE_ORDER,                                      \
+               .reverse_byte_order = (_byte_order) != LTTNG_UST_BYTE_ORDER,                                    \
                .base = (_base),                                                                        \
        }))
 
@@ -529,7 +529,7 @@ const struct lttng_ust_type_struct *lttng_ust_get_type_struct(const struct lttng
                .encoding = lttng_ust_string_encoding_UTF8,                                             \
                .elem_type = lttng_ust_static_type_integer(sizeof(char) * CHAR_BIT,                     \
                                lttng_ust_rb_alignof(char) * CHAR_BIT, lttng_ust_is_signed_type(char),  \
-                               BYTE_ORDER, 10),                                                        \
+                               LTTNG_UST_BYTE_ORDER, 10),                                                      \
        }))
 
 #define lttng_ust_static_event_field(_name, _type, _nowrite, _nofilter)                                        \
index 4941b945a1f96b32e3f19034f414a79413cdb062..d2560af4258878fb43c854120344efd091fc4e28 100644 (file)
@@ -41,10 +41,10 @@ do { \
        c ^= b; c -= rot(b, 24); \
 }
 
-#if (BYTE_ORDER == LITTLE_ENDIAN)
-#define HASH_LITTLE_ENDIAN     1
+#if (LTTNG_UST_BYTE_ORDER == LTTNG_UST_LITTLE_ENDIAN)
+#define HASH_LTTNG_UST_LITTLE_ENDIAN   1
 #else
-#define HASH_LITTLE_ENDIAN     0
+#define HASH_LTTNG_UST_LITTLE_ENDIAN   0
 #endif
 
 /*
@@ -85,7 +85,7 @@ uint32_t hashlittle(const void *key, size_t length, uint32_t initval)
        a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
 
        u.ptr = key;
-       if (HASH_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
+       if (HASH_LTTNG_UST_LITTLE_ENDIAN && ((u.i & 0x3) == 0)) {
                const uint32_t *k = (const uint32_t *) key;     /* read 32-bit chunks */
 
                /*------ all but last block: aligned reads and affect 32 bits of (a,b,c) */
@@ -128,7 +128,7 @@ uint32_t hashlittle(const void *key, size_t length, uint32_t initval)
                        }
                }
 
-       } else if (HASH_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
+       } else if (HASH_LTTNG_UST_LITTLE_ENDIAN && ((u.i & 0x1) == 0)) {
                const uint16_t *k = (const uint16_t *) key;     /* read 16-bit chunks */
                const uint8_t *k8;
 
index 75b3a25e52b260777f4370e591e0c006168a267f..137bf43347d16f0c7dd81776b29590cfdfd72282 100644 (file)
@@ -2125,11 +2125,11 @@ int ustctl_recv_reg_msg(int sock,
                return len;
 
        if (reg_msg.magic == LTTNG_UST_ABI_COMM_MAGIC) {
-               *byte_order = BYTE_ORDER == BIG_ENDIAN ?
-                               BIG_ENDIAN : LITTLE_ENDIAN;
-       } else if (reg_msg.magic == bswap_32(LTTNG_UST_ABI_COMM_MAGIC)) {
-               *byte_order = BYTE_ORDER == BIG_ENDIAN ?
-                               LITTLE_ENDIAN : BIG_ENDIAN;
+               *byte_order = LTTNG_UST_BYTE_ORDER == LTTNG_UST_BIG_ENDIAN ?
+                               LTTNG_UST_BIG_ENDIAN : LTTNG_UST_LITTLE_ENDIAN;
+       } else if (reg_msg.magic == lttng_ust_bswap_32(LTTNG_UST_ABI_COMM_MAGIC)) {
+               *byte_order = LTTNG_UST_BYTE_ORDER == LTTNG_UST_BIG_ENDIAN ?
+                               LTTNG_UST_LITTLE_ENDIAN : LTTNG_UST_BIG_ENDIAN;
        } else {
                return -LTTNG_UST_ERR_INVAL_MAGIC;
        }
index 51f10b2ebfec6526289b50baf6bcd66fe29d8cce..fe228c5d0553ed071c1f152f8eb299c8a7ed9f18 100644 (file)
@@ -79,7 +79,7 @@ int64_t capture_sequence_element_signed(uint8_t *ptr,
                int16_t tmp;
                tmp = *(int16_t *) ptr;
                if (byte_order_reversed)
-                       tmp = bswap_16(tmp);
+                       tmp = lttng_ust_bswap_16(tmp);
 
                value = tmp;
                break;
@@ -89,7 +89,7 @@ int64_t capture_sequence_element_signed(uint8_t *ptr,
                int32_t tmp;
                tmp = *(int32_t *) ptr;
                if (byte_order_reversed)
-                       tmp = bswap_32(tmp);
+                       tmp = lttng_ust_bswap_32(tmp);
 
                value = tmp;
                break;
@@ -99,7 +99,7 @@ int64_t capture_sequence_element_signed(uint8_t *ptr,
                int64_t tmp;
                tmp = *(int64_t *) ptr;
                if (byte_order_reversed)
-                       tmp = bswap_64(tmp);
+                       tmp = lttng_ust_bswap_64(tmp);
 
                value = tmp;
                break;
@@ -128,7 +128,7 @@ uint64_t capture_sequence_element_unsigned(uint8_t *ptr,
                uint16_t tmp;
                tmp = *(uint16_t *) ptr;
                if (byte_order_reversed)
-                       tmp = bswap_16(tmp);
+                       tmp = lttng_ust_bswap_16(tmp);
 
                value = tmp;
                break;
@@ -138,7 +138,7 @@ uint64_t capture_sequence_element_unsigned(uint8_t *ptr,
                uint32_t tmp;
                tmp = *(uint32_t *) ptr;
                if (byte_order_reversed)
-                       tmp = bswap_32(tmp);
+                       tmp = lttng_ust_bswap_32(tmp);
 
                value = tmp;
                break;
@@ -148,7 +148,7 @@ uint64_t capture_sequence_element_unsigned(uint8_t *ptr,
                uint64_t tmp;
                tmp = *(uint64_t *) ptr;
                if (byte_order_reversed)
-                       tmp = bswap_64(tmp);
+                       tmp = lttng_ust_bswap_64(tmp);
 
                value = tmp;
                break;
index 141e57f4d232e4e1338359e2f472f55fc3d33cef..0afa8ae69237703c071e5cedf7f13ae70b4f66a3 100644 (file)
@@ -457,7 +457,7 @@ static int dynamic_load_field(struct estack_entry *stack_top)
                dbg_printf("op load field s16\n");
                tmp = *(int16_t *) stack_top->u.ptr.ptr;
                if (stack_top->u.ptr.rev_bo)
-                       tmp = bswap_16(tmp);
+                       tmp = lttng_ust_bswap_16(tmp);
                stack_top->u.v = tmp;
                stack_top->type = REG_S64;
                break;
@@ -469,7 +469,7 @@ static int dynamic_load_field(struct estack_entry *stack_top)
                dbg_printf("op load field s32\n");
                tmp = *(int32_t *) stack_top->u.ptr.ptr;
                if (stack_top->u.ptr.rev_bo)
-                       tmp = bswap_32(tmp);
+                       tmp = lttng_ust_bswap_32(tmp);
                stack_top->u.v = tmp;
                stack_top->type = REG_S64;
                break;
@@ -481,7 +481,7 @@ static int dynamic_load_field(struct estack_entry *stack_top)
                dbg_printf("op load field s64\n");
                tmp = *(int64_t *) stack_top->u.ptr.ptr;
                if (stack_top->u.ptr.rev_bo)
-                       tmp = bswap_64(tmp);
+                       tmp = lttng_ust_bswap_64(tmp);
                stack_top->u.v = tmp;
                stack_top->type = REG_S64;
                break;
@@ -493,7 +493,7 @@ static int dynamic_load_field(struct estack_entry *stack_top)
                dbg_printf("op load field signed enumeration\n");
                tmp = *(int64_t *) stack_top->u.ptr.ptr;
                if (stack_top->u.ptr.rev_bo)
-                       tmp = bswap_64(tmp);
+                       tmp = lttng_ust_bswap_64(tmp);
                stack_top->u.v = tmp;
                stack_top->type = REG_S64;
                break;
@@ -510,7 +510,7 @@ static int dynamic_load_field(struct estack_entry *stack_top)
                dbg_printf("op load field u16\n");
                tmp = *(uint16_t *) stack_top->u.ptr.ptr;
                if (stack_top->u.ptr.rev_bo)
-                       tmp = bswap_16(tmp);
+                       tmp = lttng_ust_bswap_16(tmp);
                stack_top->u.v = tmp;
                stack_top->type = REG_U64;
                break;
@@ -522,7 +522,7 @@ static int dynamic_load_field(struct estack_entry *stack_top)
                dbg_printf("op load field u32\n");
                tmp = *(uint32_t *) stack_top->u.ptr.ptr;
                if (stack_top->u.ptr.rev_bo)
-                       tmp = bswap_32(tmp);
+                       tmp = lttng_ust_bswap_32(tmp);
                stack_top->u.v = tmp;
                stack_top->type = REG_U64;
                break;
@@ -534,7 +534,7 @@ static int dynamic_load_field(struct estack_entry *stack_top)
                dbg_printf("op load field u64\n");
                tmp = *(uint64_t *) stack_top->u.ptr.ptr;
                if (stack_top->u.ptr.rev_bo)
-                       tmp = bswap_64(tmp);
+                       tmp = lttng_ust_bswap_64(tmp);
                stack_top->u.v = tmp;
                stack_top->type = REG_U64;
                break;
@@ -546,7 +546,7 @@ static int dynamic_load_field(struct estack_entry *stack_top)
                dbg_printf("op load field unsigned enumeration\n");
                tmp = *(uint64_t *) stack_top->u.ptr.ptr;
                if (stack_top->u.ptr.rev_bo)
-                       tmp = bswap_64(tmp);
+                       tmp = lttng_ust_bswap_64(tmp);
                stack_top->u.v = tmp;
                stack_top->type = REG_U64;
                break;
index 7e992d86c6b4852b3c779c2973c51ef46e704858..3f86f175fcfb41a1410f8486ce2021c6688a46ac 100644 (file)
@@ -125,7 +125,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(ino_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(ino_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        cgroup_ns_get_size,
        cgroup_ns_record,
index f1455ea1b4248cc8f8ccc22bc6f030d5d3c4df29..0b87bd3c2455632c3a9b86c6134a8a38addf730f 100644 (file)
@@ -58,7 +58,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(int) * CHAR_BIT,
                                lttng_ust_rb_alignof(int) * CHAR_BIT,
                                lttng_ust_is_signed_type(int),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        cpu_id_get_size,
        cpu_id_record,
index 2a652913547007ed5d6efb7c4a13fcf2085e8810..00ed8b06acad41d3793153c056299471f2618713 100644 (file)
@@ -44,7 +44,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(void *) * CHAR_BIT,
                                lttng_ust_rb_alignof(void *) * CHAR_BIT,
                                lttng_ust_is_signed_type(void *),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        ip_get_size,
        ip_record,
index d6206bd4c4f84d5bb7cca8c828cbae31283244b0..fcf6b0cc50106e0ac3f7d9831e1ae0d96c9d9c97 100644 (file)
@@ -123,7 +123,7 @@ const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(ino_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(ino_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        ipc_ns_get_size,
        ipc_ns_record,
index e7b32e6498c7ccf6953b4651c15757247c37186f..d62bc860d99ca6f65decea985a0cfab913787037 100644 (file)
@@ -106,7 +106,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(ino_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(ino_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        mnt_ns_get_size,
        mnt_ns_record,
index 5a8086f431e4c04162e48b63bdae3a7e9d64becf..5b269c611687997dc0d68e9f5b01129d85b52373 100644 (file)
@@ -123,7 +123,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(ino_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(ino_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        net_ns_get_size,
        net_ns_record,
index 328980c486d13db75703db9205c685523425427d..5a7dec4aac0e900013f07f372ca69255675051c7 100644 (file)
@@ -531,7 +531,7 @@ static const struct lttng_ust_type_common *ust_type =
        lttng_ust_static_type_integer(sizeof(uint64_t) * CHAR_BIT,
                        lttng_ust_rb_alignof(uint64_t) * CHAR_BIT,
                        lttng_ust_is_signed_type(uint64_t),
-                       BYTE_ORDER, 10);
+                       LTTNG_UST_BYTE_ORDER, 10);
 
 /* Called with UST lock held */
 int lttng_add_perf_counter_to_ctx(uint32_t type,
index f8e5aa4f4cec12e3810d673bacc019ab20ddc068..f1bb48faabd45f55c4882ff69f6b7573b47a7321 100644 (file)
@@ -109,7 +109,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(ino_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(ino_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        pid_ns_get_size,
        pid_ns_record,
index 8a608c247ca0612a5bc4dd5db2a2ab2042ca96bd..af98816b4d5801001bbbb02ae1967938ea97a9a0 100644 (file)
@@ -50,7 +50,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(unsigned long) * CHAR_BIT,
                                lttng_ust_rb_alignof(unsigned long) * CHAR_BIT,
                                lttng_ust_is_signed_type(unsigned long),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        pthread_id_get_size,
        pthread_id_record,
index 328d9e08b05f75cbb83be4d57f1a5108e40cd9e8..78423298909b0041386484fc4062275d4ca2678f 100644 (file)
@@ -122,7 +122,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(ino_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(ino_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        time_ns_get_size,
        time_ns_record,
index ab49e34cd0d39405dd2785fe67fb4fe7e502d7ed..97612bc60dbeec80dfd7c4b8624886c30d5f5914 100644 (file)
@@ -106,7 +106,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(ino_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(ino_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        user_ns_get_size,
        user_ns_record,
index 9ca666eb7a8468904be71632cdb6be02e2c50a8b..0ec8ed44adac564e2ee94c19d88ce2ac6c036d9c 100644 (file)
@@ -124,7 +124,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(ino_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(ino_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(ino_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        uts_ns_get_size,
        uts_ns_record,
index 9fcd43ec823f79e9b71b15939b94fdd05fdfdc1f..682f7d9a573a6e38d451ccb28e239623dcf96ca2 100644 (file)
@@ -95,7 +95,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(gid_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(gid_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(gid_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        vegid_get_size,
        vegid_record,
index 201ee2f35fa9146262343ab26515bcbd27528170..505a1b636d34b54e8f27d777188871a3e26d0bf5 100644 (file)
@@ -95,7 +95,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(uid_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(uid_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(uid_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        veuid_get_size,
        veuid_record,
index 312580e3832db3b652f23dbf5b903f2253406379..c19be225a3a687137aa317af21db9a55559888af 100644 (file)
@@ -95,7 +95,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(gid_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(gid_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(gid_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        vgid_get_size,
        vgid_record,
index 47b5a8e17e18ad3e6259f79d09ff62aa3460b8c9..1558ee9851fb28ddf284f0cca0ef9453c1a207a7 100644 (file)
@@ -78,7 +78,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(pid_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(pid_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(pid_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        vpid_get_size,
        vpid_record,
index e05e680d503d0960fd008de234258d4265505328..f66b6b76db342615b6e97f847d11c380454d99a4 100644 (file)
@@ -99,7 +99,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(gid_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(gid_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(gid_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        vsgid_get_size,
        vsgid_record,
index ee2f022b6b2af94fc325b8d2cf6be2b4f03fc61b..2e442c94433dcbf031921452bab8419fb03cdb8a 100644 (file)
@@ -99,7 +99,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(uid_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(uid_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(uid_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        vsuid_get_size,
        vsuid_record,
index 732a82057770833fa74ba72e25f0bc39a464480b..6a206a906d39a84529066942b825933e893db521 100644 (file)
@@ -82,7 +82,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(pid_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(pid_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(pid_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        vtid_get_size,
        vtid_record,
index 3e72d05e97917745395aa32587ac83b97d2813ae..d96a8c9ba40bbdd796729a2cb71d8310eea0f122 100644 (file)
@@ -95,7 +95,7 @@ static const struct lttng_ust_ctx_field *ctx_field = lttng_ust_static_ctx_field(
                lttng_ust_static_type_integer(sizeof(uid_t) * CHAR_BIT,
                                lttng_ust_rb_alignof(uid_t) * CHAR_BIT,
                                lttng_ust_is_signed_type(uid_t),
-                               BYTE_ORDER, 10),
+                               LTTNG_UST_BYTE_ORDER, 10),
                false, false),
        vuid_get_size,
        vuid_record,
index 06333906324040e30e18946106166097cf6abd71..4147e3a70dec262ee00ec4a5a5a7860c492808ec 100644 (file)
@@ -69,49 +69,49 @@ const struct lttng_ust_event_field *dt_var_fields[_NR_LTTNG_UST_DYNAMIC_TYPES] =
        [LTTNG_UST_DYNAMIC_TYPE_S8] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, {
                .struct_size = sizeof(struct lttng_ust_event_field),
                .name = "int8",
-               .type = lttng_ust_type_integer_define(int8_t, BYTE_ORDER, 10),
+               .type = lttng_ust_type_integer_define(int8_t, LTTNG_UST_BYTE_ORDER, 10),
                .nowrite = 0,
        }),
        [LTTNG_UST_DYNAMIC_TYPE_S16] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, {
                .struct_size = sizeof(struct lttng_ust_event_field),
                .name = "int16",
-               .type = lttng_ust_type_integer_define(int16_t, BYTE_ORDER, 10),
+               .type = lttng_ust_type_integer_define(int16_t, LTTNG_UST_BYTE_ORDER, 10),
                .nowrite = 0,
        }),
        [LTTNG_UST_DYNAMIC_TYPE_S32] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, {
                .struct_size = sizeof(struct lttng_ust_event_field),
                .name = "int32",
-               .type = lttng_ust_type_integer_define(int32_t, BYTE_ORDER, 10),
+               .type = lttng_ust_type_integer_define(int32_t, LTTNG_UST_BYTE_ORDER, 10),
                .nowrite = 0,
        }),
        [LTTNG_UST_DYNAMIC_TYPE_S64] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, {
                .struct_size = sizeof(struct lttng_ust_event_field),
                .name = "int64",
-               .type = lttng_ust_type_integer_define(int64_t, BYTE_ORDER, 10),
+               .type = lttng_ust_type_integer_define(int64_t, LTTNG_UST_BYTE_ORDER, 10),
                .nowrite = 0,
        }),
        [LTTNG_UST_DYNAMIC_TYPE_U8] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, {
                .struct_size = sizeof(struct lttng_ust_event_field),
                .name = "uint8",
-               .type = lttng_ust_type_integer_define(uint8_t, BYTE_ORDER, 10),
+               .type = lttng_ust_type_integer_define(uint8_t, LTTNG_UST_BYTE_ORDER, 10),
                .nowrite = 0,
        }),
        [LTTNG_UST_DYNAMIC_TYPE_U16] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, {
                .struct_size = sizeof(struct lttng_ust_event_field),
                .name = "uint16",
-               .type = lttng_ust_type_integer_define(uint16_t, BYTE_ORDER, 10),
+               .type = lttng_ust_type_integer_define(uint16_t, LTTNG_UST_BYTE_ORDER, 10),
                .nowrite = 0,
        }),
        [LTTNG_UST_DYNAMIC_TYPE_U32] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, {
                .struct_size = sizeof(struct lttng_ust_event_field),
                .name = "uint32",
-               .type = lttng_ust_type_integer_define(uint32_t, BYTE_ORDER, 10),
+               .type = lttng_ust_type_integer_define(uint32_t, LTTNG_UST_BYTE_ORDER, 10),
                .nowrite = 0,
        }),
        [LTTNG_UST_DYNAMIC_TYPE_U64] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, {
                .struct_size = sizeof(struct lttng_ust_event_field),
                .name = "uint64",
-               .type = lttng_ust_type_integer_define(uint64_t, BYTE_ORDER, 10),
+               .type = lttng_ust_type_integer_define(uint64_t, LTTNG_UST_BYTE_ORDER, 10),
                .nowrite = 0,
        }),
        [LTTNG_UST_DYNAMIC_TYPE_FLOAT] = LTTNG_UST_COMPOUND_LITERAL(const struct lttng_ust_event_field, {
@@ -149,7 +149,7 @@ static const struct lttng_ust_event_field dt_enum_field = {
                },
                .struct_size = sizeof(struct lttng_ust_type_enum),
                .desc = &dt_enum_desc,
-               .container_type = lttng_ust_type_integer_define(char, BYTE_ORDER, 10),
+               .container_type = lttng_ust_type_integer_define(char, LTTNG_UST_BYTE_ORDER, 10),
        }),
        .nowrite = 0,
 };
This page took 0.047842 seconds and 4 git commands to generate.