X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Fust-ctl.h;h=a6e180235203e6611a7b5d3601188ac2ea17e988;hb=9b14815a9ee98c0dbc842a1e545cd6a82ae7b18a;hp=8b040e2cdccfc30d874f3b464a9480a0f829c461;hpb=fd17d7cecd427479c035cd99cb2b2fb622bb3a38;p=lttng-ust.git diff --git a/include/lttng/ust-ctl.h b/include/lttng/ust-ctl.h index 8b040e2c..a6e18023 100644 --- a/include/lttng/ust-ctl.h +++ b/include/lttng/ust-ctl.h @@ -15,10 +15,7 @@ #include #include - -#ifndef LTTNG_PACKED -#error "LTTNG_PACKED should be defined" -#endif +#include #ifndef LTTNG_UST_UUID_LEN #define LTTNG_UST_UUID_LEN 16 @@ -27,7 +24,7 @@ /* Default unix socket path */ #define LTTNG_UST_SOCK_FILENAME \ "lttng-ust-sock-" \ - __ust_stringify(LTTNG_UST_ABI_MAJOR_VERSION) + lttng_ust_stringify(LTTNG_UST_ABI_MAJOR_VERSION) /* * Shared memory files path are automatically related to shm root, e.g. @@ -35,10 +32,7 @@ */ #define LTTNG_UST_WAIT_FILENAME \ "lttng-ust-wait-" \ - __ust_stringify(LTTNG_UST_ABI_MAJOR_VERSION) - -struct lttng_ust_shm_handle; -struct lttng_ust_lib_ring_buffer; + lttng_ust_stringify(LTTNG_UST_ABI_MAJOR_VERSION) struct ustctl_consumer_channel_attr { enum lttng_ust_abi_chan_type type; @@ -51,7 +45,7 @@ struct ustctl_consumer_channel_attr { uint32_t chan_id; /* channel ID */ unsigned char uuid[LTTNG_UST_UUID_LEN]; /* Trace session unique ID */ int64_t blocking_timeout; /* Blocking timeout (usec) */ -} LTTNG_PACKED; +} __attribute__((packed)); /* * API used by sessiond. @@ -358,7 +352,7 @@ struct ustctl_integer_type { int32_t encoding; /* enum ustctl_string_encodings */ uint16_t alignment; /* in bits */ char padding[USTCTL_UST_INTEGER_TYPE_PADDING]; -} LTTNG_PACKED; +} __attribute__((packed)); #define USTCTL_UST_FLOAT_TYPE_PADDING 24 struct ustctl_float_type { @@ -367,14 +361,14 @@ struct ustctl_float_type { uint32_t reverse_byte_order; uint16_t alignment; /* in bits */ char padding[USTCTL_UST_FLOAT_TYPE_PADDING]; -} LTTNG_PACKED; +} __attribute__((packed)); #define USTCTL_UST_ENUM_VALUE_PADDING 15 struct ustctl_enum_value { uint64_t value; uint8_t signedness; char padding[USTCTL_UST_ENUM_VALUE_PADDING]; -} LTTNG_PACKED; +} __attribute__((packed)); enum ustctl_ust_enum_entry_options { USTCTL_UST_ENUM_ENTRY_OPTION_IS_AUTO = 1U << 0, @@ -387,10 +381,10 @@ struct ustctl_enum_entry { union { struct { uint32_t options; - } LTTNG_PACKED extra; + } __attribute__((packed)) extra; char padding[USTCTL_UST_ENUM_ENTRY_PADDING]; } u; -} LTTNG_PACKED; +} __attribute__((packed)); /* legacy */ #define USTCTL_UST_BASIC_TYPE_PADDING 296 @@ -406,7 +400,7 @@ union _ustctl_basic_type { } string; struct ustctl_float_type _float; char padding[USTCTL_UST_BASIC_TYPE_PADDING]; -} LTTNG_PACKED; +} __attribute__((packed)); /* legacy */ struct ustctl_basic_type { @@ -414,7 +408,7 @@ struct ustctl_basic_type { union { union _ustctl_basic_type basic; } u; -} LTTNG_PACKED; +} __attribute__((packed)); /* * Padding is derived from largest member: u.legacy.sequence which @@ -479,14 +473,14 @@ struct ustctl_type { } legacy; char padding[USTCTL_UST_TYPE_PADDING]; } u; -} LTTNG_PACKED; +} __attribute__((packed)); #define USTCTL_UST_FIELD_PADDING 28 struct ustctl_field { char name[LTTNG_UST_ABI_SYM_NAME_LEN]; struct ustctl_type type; char padding[USTCTL_UST_FIELD_PADDING]; -} LTTNG_PACKED; +} __attribute__((packed)); /* * Returns 0 on success, negative error value on error.