trace.h: Use side_ptr_t for event description
[libside.git] / include / side / trace.h
index b3b8f6ea1b82206b366a7cc0c881d8a3ae11a8b0..d941616bdae1488a5fe5b57bcd61b52e8b0a70eb 100644 (file)
@@ -330,7 +330,7 @@ struct side_enum_mapping {
 } SIDE_PACKED;
 
 struct side_enum_mappings {
-       const struct side_enum_mapping *mappings;
+       side_ptr_t(const struct side_enum_mapping) mappings;
        side_ptr_t(const struct side_attr) attr;
        uint32_t nr_mappings;
        uint32_t nr_attr;
@@ -343,47 +343,47 @@ struct side_enum_bitmap_mapping {
 } SIDE_PACKED;
 
 struct side_enum_bitmap_mappings {
-       const struct side_enum_bitmap_mapping *mappings;
+       side_ptr_t(const struct side_enum_bitmap_mapping) mappings;
        side_ptr_t(const struct side_attr) attr;
        uint32_t nr_mappings;
        uint32_t nr_attr;
 } SIDE_PACKED;
 
 struct side_type_struct {
-       const struct side_event_field *fields;
+       side_ptr_t(const struct side_event_field) fields;
        side_ptr_t(const struct side_attr) attr;
        uint32_t nr_fields;
        uint32_t nr_attr;
 } SIDE_PACKED;
 
 struct side_type_array {
-       const struct side_type *elem_type;
+       side_ptr_t(const struct side_type) elem_type;
        side_ptr_t(const struct side_attr) attr;
        uint32_t length;
        uint32_t nr_attr;
 } SIDE_PACKED;
 
 struct side_type_vla {
-       const struct side_type *elem_type;
+       side_ptr_t(const struct side_type) elem_type;
        side_ptr_t(const struct side_attr) attr;
        uint32_t nr_attr;
 } SIDE_PACKED;
 
 struct side_type_vla_visitor {
-       const struct side_type *elem_type;
+       side_ptr_t(const struct side_type) elem_type;
        side_visitor_func visitor;
        side_ptr_t(const struct side_attr) attr;
        uint32_t nr_attr;
 } SIDE_PACKED;
 
 struct side_type_enum {
-       const struct side_enum_mappings *mappings;
-       const struct side_type *elem_type;
+       side_ptr_t(const struct side_enum_mappings) mappings;
+       side_ptr_t(const struct side_type) elem_type;
 } SIDE_PACKED;
 
 struct side_type_enum_bitmap {
-       const struct side_enum_bitmap_mappings *mappings;
-       const struct side_type *elem_type;
+       side_ptr_t(const struct side_enum_bitmap_mappings) mappings;
+       side_ptr_t(const struct side_type) elem_type;
 } SIDE_PACKED;
 
 struct side_type_gather_bool {
@@ -419,14 +419,14 @@ struct side_type_gather_string {
 } SIDE_PACKED;
 
 struct side_type_gather_enum {
-       const struct side_enum_mappings *mappings;
-       const struct side_type *elem_type;
+       side_ptr_t(const struct side_enum_mappings) mappings;
+       side_ptr_t(const struct side_type) elem_type;
 } SIDE_PACKED;
 
 struct side_type_gather_struct {
        uint64_t offset;        /* bytes */
        uint8_t access_mode;    /* enum side_type_gather_access_mode */
-       const struct side_type_struct *type;
+       side_ptr_t(const struct side_type_struct) type;
        uint32_t size;          /* bytes */
 } SIDE_PACKED;
 
@@ -437,7 +437,7 @@ struct side_type_gather_array {
 } SIDE_PACKED;
 
 struct side_type_gather_vla {
-       const struct side_type *length_type;    /* side_length() */
+       side_ptr_t(const struct side_type) length_type; /* side_length() */
 
        uint64_t offset;        /* bytes */
        uint8_t access_mode;    /* enum side_type_gather_access_mode */
@@ -473,8 +473,8 @@ struct side_type {
                struct side_type_array side_array;
                struct side_type_vla side_vla;
                struct side_type_vla_visitor side_vla_visitor;
-               const struct side_type_struct *side_struct;
-               const struct side_type_variant *side_variant;
+               side_ptr_t(const struct side_type_struct) side_struct;
+               side_ptr_t(const struct side_type_variant) side_variant;
 
                /* Stack-copy enumeration types */
                struct side_type_enum side_enum;
@@ -493,14 +493,14 @@ struct side_variant_option {
 
 struct side_type_variant {
        const struct side_type selector;
-       const struct side_variant_option *options;
+       side_ptr_t(const struct side_variant_option) options;
        side_ptr_t(const struct side_attr) attr;
        uint32_t nr_options;
        uint32_t nr_attr;
 } SIDE_PACKED;
 
 struct side_event_field {
-       const char *field_name;
+       side_ptr_t(const char) field_name;
        struct side_type side_type;
 } SIDE_PACKED;
 
@@ -525,42 +525,42 @@ union side_arg_static {
        /* Stack-copy basic types */
        union side_bool_value bool_value;
        uint8_t byte_value;
-       uint64_t string_value;  /* const {uint8_t, uint16_t, uint32_t} * */
+       side_ptr_t(const void) string_value;    /* const {uint8_t, uint16_t, uint32_t} * */
        union side_integer_value integer_value;
        union side_float_value float_value;
 
        /* Stack-copy compound types */
-       const struct side_arg_vec *side_struct;
-       const struct side_arg_variant *side_variant;
-       const struct side_arg_vec *side_array;
-       const struct side_arg_vec *side_vla;
+       side_ptr_t(const struct side_arg_vec) side_struct;
+       side_ptr_t(const struct side_arg_variant) side_variant;
+       side_ptr_t(const struct side_arg_vec) side_array;
+       side_ptr_t(const struct side_arg_vec) side_vla;
        void *side_vla_app_visitor_ctx;
 
        /* Gather basic types */
-       const void *side_bool_gather_ptr;
-       const void *side_byte_gather_ptr;
-       const void *side_integer_gather_ptr;
-       const void *side_float_gather_ptr;
-       const void *side_string_gather_ptr;
+       side_ptr_t(const void) side_bool_gather_ptr;
+       side_ptr_t(const void) side_byte_gather_ptr;
+       side_ptr_t(const void) side_integer_gather_ptr;
+       side_ptr_t(const void) side_float_gather_ptr;
+       side_ptr_t(const void) side_string_gather_ptr;
 
        /* Gather compound types */
-       const void *side_array_gather_ptr;
-       const void *side_struct_gather_ptr;
+       side_ptr_t(const void) side_array_gather_ptr;
+       side_ptr_t(const void) side_struct_gather_ptr;
        struct {
-               const void *ptr;
-               const void *length_ptr;
+               side_ptr_t(const void) ptr;
+               side_ptr_t(const void) length_ptr;
        } SIDE_PACKED side_vla_gather;
 } SIDE_PACKED;
 
 struct side_arg_dynamic_vla {
-       const struct side_arg *sav;
+       side_ptr_t(const struct side_arg) sav;
        side_ptr_t(const struct side_attr) attr;
        uint32_t len;
        uint32_t nr_attr;
 } SIDE_PACKED;
 
 struct side_arg_dynamic_struct {
-       const struct side_arg_dynamic_field *fields;
+       side_ptr_t(const struct side_arg_dynamic_field) fields;
        side_ptr_t(const struct side_attr) attr;
        uint32_t len;
        uint32_t nr_attr;
@@ -605,8 +605,8 @@ union side_arg_dynamic {
        } SIDE_PACKED side_float;
 
        /* Dynamic compound types */
-       const struct side_arg_dynamic_struct *side_dynamic_struct;
-       const struct side_arg_dynamic_vla *side_dynamic_vla;
+       side_ptr_t(const struct side_arg_dynamic_struct) side_dynamic_struct;
+       side_ptr_t(const struct side_arg_dynamic_vla) side_dynamic_vla;
 
        struct side_dynamic_struct_visitor side_dynamic_struct_visitor;
        struct side_dynamic_vla_visitor side_dynamic_vla_visitor;
@@ -626,12 +626,12 @@ struct side_arg_variant {
 } SIDE_PACKED;
 
 struct side_arg_vec {
-       const struct side_arg *sav;
+       side_ptr_t(const struct side_arg) sav;
        uint32_t len;
 } SIDE_PACKED;
 
 struct side_arg_dynamic_field {
-       const char *field_name;
+       side_ptr_t(const char) field_name;
        const struct side_arg elem;
 } SIDE_PACKED;
 
@@ -661,10 +661,10 @@ struct side_event_state {
 };
 
 struct side_event_description {
-       struct side_event_state *state;
-       const char *provider_name;
-       const char *event_name;
-       const struct side_event_field *fields;
+       side_ptr_t(struct side_event_state) state;
+       side_ptr_t(const char) provider_name;
+       side_ptr_t(const char) event_name;
+       side_ptr_t(const struct side_event_field) fields;
        side_ptr_t(const struct side_attr) attr;
        uint64_t flags;
        uint32_t version;
@@ -723,7 +723,7 @@ struct side_event_description {
 
 #define side_define_enum(_identifier, _mappings, _attr...) \
        const struct side_enum_mappings _identifier = { \
-               .mappings = _mappings, \
+               .mappings = SIDE_PTR_INIT(_mappings), \
                .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                .nr_mappings = SIDE_ARRAY_SIZE(SIDE_PARAM(_mappings)), \
                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
@@ -756,7 +756,7 @@ struct side_event_description {
 
 #define side_define_enum_bitmap(_identifier, _mappings, _attr...) \
        const struct side_enum_bitmap_mappings _identifier = { \
-               .mappings = _mappings, \
+               .mappings = SIDE_PTR_INIT(_mappings), \
                .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                .nr_mappings = SIDE_ARRAY_SIZE(SIDE_PARAM(_mappings)), \
                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
@@ -873,7 +873,7 @@ struct side_event_description {
 
 #define _side_field(_name, _type) \
        { \
-               .field_name = _name, \
+               .field_name = SIDE_PTR_INIT(_name), \
                .side_type = _type, \
        }
 
@@ -989,8 +989,8 @@ struct side_event_description {
                .type = SIDE_TYPE_ENUM, \
                .u = { \
                        .side_enum = { \
-                               .mappings = _mappings, \
-                               .elem_type = _elem_type, \
+                               .mappings = SIDE_PTR_INIT(_mappings), \
+                               .elem_type = SIDE_PTR_INIT(_elem_type), \
                        }, \
                }, \
        }
@@ -1002,8 +1002,8 @@ struct side_event_description {
                .type = SIDE_TYPE_ENUM_BITMAP, \
                .u = { \
                        .side_enum_bitmap = { \
-                               .mappings = _mappings, \
-                               .elem_type = _elem_type, \
+                               .mappings = SIDE_PTR_INIT(_mappings), \
+                               .elem_type = SIDE_PTR_INIT(_elem_type), \
                        }, \
                }, \
        }
@@ -1014,7 +1014,7 @@ struct side_event_description {
        { \
                .type = SIDE_TYPE_STRUCT, \
                .u = { \
-                       .side_struct = _struct, \
+                       .side_struct = SIDE_PTR_INIT(_struct), \
                }, \
        }
 #define side_field_struct(_name, _struct) \
@@ -1022,7 +1022,7 @@ struct side_event_description {
 
 #define _side_type_struct_define(_fields, _attr) \
        { \
-               .fields = _fields, \
+               .fields = SIDE_PTR_INIT(_fields), \
                .attr = SIDE_PTR_INIT(_attr), \
                .nr_fields = SIDE_ARRAY_SIZE(SIDE_PARAM(_fields)), \
                .nr_attr  = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
@@ -1039,7 +1039,7 @@ struct side_event_description {
        { \
                .type = SIDE_TYPE_VARIANT, \
                .u = { \
-                       .side_variant = _variant, \
+                       .side_variant = SIDE_PTR_INIT(_variant), \
                }, \
        }
 #define side_field_variant(_name, _variant) \
@@ -1048,7 +1048,7 @@ struct side_event_description {
 #define _side_type_variant_define(_selector, _options, _attr) \
        { \
                .selector = _selector, \
-               .options = _options, \
+               .options = SIDE_PTR_INIT(_options), \
                .attr = SIDE_PTR_INIT(_attr), \
                .nr_options = SIDE_ARRAY_SIZE(SIDE_PARAM(_options)), \
                .nr_attr  = SIDE_ARRAY_SIZE(SIDE_PARAM(_attr)), \
@@ -1067,7 +1067,7 @@ struct side_event_description {
                .type = SIDE_TYPE_ARRAY, \
                .u = { \
                        .side_array = { \
-                               .elem_type = _elem_type, \
+                               .elem_type = SIDE_PTR_INIT(_elem_type), \
                                .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                                .length = _length, \
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
@@ -1082,7 +1082,7 @@ struct side_event_description {
                .type = SIDE_TYPE_VLA, \
                .u = { \
                        .side_vla = { \
-                               .elem_type = _elem_type, \
+                               .elem_type = SIDE_PTR_INIT(_elem_type), \
                                .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                        }, \
@@ -1096,7 +1096,7 @@ struct side_event_description {
                .type = SIDE_TYPE_VLA_VISITOR, \
                .u = { \
                        .side_vla_visitor = { \
-                               .elem_type = SIDE_PARAM(_elem_type), \
+                               .elem_type = SIDE_PTR_INIT(_elem_type), \
                                .visitor = _visitor, \
                                .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
@@ -1337,8 +1337,8 @@ struct side_event_description {
                .type = SIDE_TYPE_GATHER_ENUM, \
                .u = { \
                        .side_enum = { \
-                               .mappings = _mappings, \
-                               .elem_type = _elem_type, \
+                               .mappings = SIDE_PTR_INIT(_mappings), \
+                               .elem_type = SIDE_PTR_INIT(_elem_type), \
                        }, \
                }, \
        }
@@ -1354,7 +1354,7 @@ struct side_event_description {
                                        .side_struct = { \
                                                .offset = _offset, \
                                                .access_mode = _access_mode, \
-                                               .type = _struct_gather, \
+                                               .type = SIDE_PTR_INIT(_struct_gather), \
                                                .size = _size, \
                                        }, \
                                }, \
@@ -1374,7 +1374,7 @@ struct side_event_description {
                                                .offset = _offset, \
                                                .access_mode = _access_mode, \
                                                .type = { \
-                                                       .elem_type = _elem_type_gather, \
+                                                       .elem_type = SIDE_PTR_INIT(_elem_type_gather), \
                                                        .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                                                        .length = _length, \
                                                        .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
@@ -1394,11 +1394,11 @@ struct side_event_description {
                        .side_gather = { \
                                .u = { \
                                        .side_vla = { \
-                                               .length_type = _length_type_gather, \
+                                               .length_type = SIDE_PTR_INIT(_length_type_gather), \
                                                .offset = _offset, \
                                                .access_mode = _access_mode, \
                                                .type = { \
-                                                       .elem_type = _elem_type_gather, \
+                                                       .elem_type = SIDE_PTR_INIT(_elem_type_gather), \
                                                        .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                                                        .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                                                }, \
@@ -1427,9 +1427,9 @@ struct side_event_description {
 #define side_arg_null(_val)            { .type = SIDE_TYPE_NULL }
 #define side_arg_bool(_val)            { .type = SIDE_TYPE_BOOL, .u = { .side_static = { .bool_value = { .side_bool8 = !!(_val) } } } }
 #define side_arg_byte(_val)            { .type = SIDE_TYPE_BYTE, .u = { .side_static = { .byte_value = (_val) } } }
-#define side_arg_string(_val)          { .type = SIDE_TYPE_STRING_UTF8, .u = { .side_static = { .string_value = (uintptr_t) (_val) } } }
-#define side_arg_string16(_val)                { .type = SIDE_TYPE_STRING_UTF16, .u = { .side_static = { .string_value = (uintptr_t) (_val) } } }
-#define side_arg_string32(_val)                { .type = SIDE_TYPE_STRING_UTF32, .u = { .side_static = { .string_value = (uintptr_t) (_val) } } }
+#define side_arg_string(_val)          { .type = SIDE_TYPE_STRING_UTF8, .u = { .side_static = { .string_value = SIDE_PTR_INIT(_val) } } }
+#define side_arg_string16(_val)                { .type = SIDE_TYPE_STRING_UTF16, .u = { .side_static = { .string_value = SIDE_PTR_INIT(_val) } } }
+#define side_arg_string32(_val)                { .type = SIDE_TYPE_STRING_UTF32, .u = { .side_static = { .string_value = SIDE_PTR_INIT(_val) } } }
 
 #define side_arg_u8(_val)              { .type = SIDE_TYPE_U8, .u = { .side_static = {  .integer_value = { .side_u8 = (_val) } } } }
 #define side_arg_u16(_val)             { .type = SIDE_TYPE_U16, .u = { .side_static = { .integer_value = { .side_u16 = (_val) } } } }
@@ -1445,7 +1445,7 @@ struct side_event_description {
 #define side_arg_float_binary64(_val)  { .type = SIDE_TYPE_FLOAT_BINARY64, .u = { .side_static = { .float_value = { .side_float_binary64 = (_val) } } } }
 #define side_arg_float_binary128(_val) { .type = SIDE_TYPE_FLOAT_BINARY128, .u = { .side_static = { .float_value = { .side_float_binary128 = (_val) } } } }
 
-#define side_arg_struct(_side_type)    { .type = SIDE_TYPE_STRUCT, .u = { .side_static = { .side_struct = (_side_type) } } }
+#define side_arg_struct(_side_type)    { .type = SIDE_TYPE_STRUCT, .u = { .side_static = { .side_struct = SIDE_PTR_INIT(_side_type) } } }
 
 #define side_arg_define_variant(_identifier, _selector_val, _option) \
        const struct side_arg_variant _identifier = { \
@@ -1457,26 +1457,26 @@ struct side_event_description {
                .type = SIDE_TYPE_VARIANT, \
                .u = { \
                        .side_static = { \
-                               .side_variant = (_side_variant), \
+                               .side_variant = SIDE_PTR_INIT(_side_variant), \
                        }, \
                }, \
        }
 
-#define side_arg_array(_side_type)     { .type = SIDE_TYPE_ARRAY, .u = { .side_static = { .side_array = (_side_type) } } }
-#define side_arg_vla(_side_type)       { .type = SIDE_TYPE_VLA, .u = { .side_static = { .side_vla = (_side_type) } } }
+#define side_arg_array(_side_type)     { .type = SIDE_TYPE_ARRAY, .u = { .side_static = { .side_array = SIDE_PTR_INIT(_side_type) } } }
+#define side_arg_vla(_side_type)       { .type = SIDE_TYPE_VLA, .u = { .side_static = { .side_vla = SIDE_PTR_INIT(_side_type) } } }
 #define side_arg_vla_visitor(_ctx)     { .type = SIDE_TYPE_VLA_VISITOR, .u = { .side_static = { .side_vla_app_visitor_ctx = (_ctx) } } }
 
 /* Gather field arguments */
 
-#define side_arg_gather_bool(_ptr)             { .type = SIDE_TYPE_GATHER_BOOL, .u = { .side_static = { .side_bool_gather_ptr = (_ptr) } } }
-#define side_arg_gather_byte(_ptr)             { .type = SIDE_TYPE_GATHER_BYTE, .u = { .side_static = { .side_byte_gather_ptr = (_ptr) } } }
-#define side_arg_gather_pointer(_ptr)          { .type = SIDE_TYPE_GATHER_POINTER, .u = { .side_static = { .side_integer_gather_ptr = (_ptr) } } }
-#define side_arg_gather_integer(_ptr)          { .type = SIDE_TYPE_GATHER_INTEGER, .u = { .side_static = { .side_integer_gather_ptr = (_ptr) } } }
-#define side_arg_gather_float(_ptr)            { .type = SIDE_TYPE_GATHER_FLOAT, .u = { .side_static = { .side_float_gather_ptr = (_ptr) } } }
-#define side_arg_gather_string(_ptr)           { .type = SIDE_TYPE_GATHER_STRING, .u = { .side_static = { .side_string_gather_ptr = (_ptr) } } }
-#define side_arg_gather_struct(_ptr)           { .type = SIDE_TYPE_GATHER_STRUCT, .u = { .side_static = { .side_struct_gather_ptr = (_ptr) } } }
-#define side_arg_gather_array(_ptr)            { .type = SIDE_TYPE_GATHER_ARRAY, .u = { .side_static = { .side_array_gather_ptr = (_ptr) } } }
-#define side_arg_gather_vla(_ptr, _length_ptr) { .type = SIDE_TYPE_GATHER_VLA, .u = { .side_static = { .side_vla_gather = { .ptr = (_ptr), .length_ptr = (_length_ptr) } } } }
+#define side_arg_gather_bool(_ptr)             { .type = SIDE_TYPE_GATHER_BOOL, .u = { .side_static = { .side_bool_gather_ptr = SIDE_PTR_INIT(_ptr) } } }
+#define side_arg_gather_byte(_ptr)             { .type = SIDE_TYPE_GATHER_BYTE, .u = { .side_static = { .side_byte_gather_ptr = SIDE_PTR_INIT(_ptr) } } }
+#define side_arg_gather_pointer(_ptr)          { .type = SIDE_TYPE_GATHER_POINTER, .u = { .side_static = { .side_integer_gather_ptr = SIDE_PTR_INIT(_ptr) } } }
+#define side_arg_gather_integer(_ptr)          { .type = SIDE_TYPE_GATHER_INTEGER, .u = { .side_static = { .side_integer_gather_ptr = SIDE_PTR_INIT(_ptr) } } }
+#define side_arg_gather_float(_ptr)            { .type = SIDE_TYPE_GATHER_FLOAT, .u = { .side_static = { .side_float_gather_ptr = SIDE_PTR_INIT(_ptr) } } }
+#define side_arg_gather_string(_ptr)           { .type = SIDE_TYPE_GATHER_STRING, .u = { .side_static = { .side_string_gather_ptr = SIDE_PTR_INIT(_ptr) } } }
+#define side_arg_gather_struct(_ptr)           { .type = SIDE_TYPE_GATHER_STRUCT, .u = { .side_static = { .side_struct_gather_ptr = SIDE_PTR_INIT(_ptr) } } }
+#define side_arg_gather_array(_ptr)            { .type = SIDE_TYPE_GATHER_ARRAY, .u = { .side_static = { .side_array_gather_ptr = SIDE_PTR_INIT(_ptr) } } }
+#define side_arg_gather_vla(_ptr, _length_ptr) { .type = SIDE_TYPE_GATHER_VLA, .u = { .side_static = { .side_vla_gather = { .ptr = SIDE_PTR_INIT(_ptr), .length_ptr = SIDE_PTR_INIT(_length_ptr) } } } }
 
 /* Dynamic field arguments */
 
@@ -1680,7 +1680,7 @@ struct side_event_description {
                .type = SIDE_TYPE_DYNAMIC_VLA, \
                .u = { \
                        .side_dynamic = { \
-                               .side_dynamic_vla = (_vla), \
+                               .side_dynamic_vla = SIDE_PTR_INIT(_vla), \
                        }, \
                }, \
        }
@@ -1705,7 +1705,7 @@ struct side_event_description {
                .type = SIDE_TYPE_DYNAMIC_STRUCT, \
                .u = { \
                        .side_dynamic = { \
-                               .side_dynamic_struct = (_struct), \
+                               .side_dynamic_struct = SIDE_PTR_INIT(_struct), \
                        }, \
                }, \
        }
@@ -1728,7 +1728,7 @@ struct side_event_description {
 #define side_arg_dynamic_define_vec(_identifier, _sav, _attr...) \
        const struct side_arg _identifier##_vec[] = { _sav }; \
        const struct side_arg_dynamic_vla _identifier = { \
-               .sav = _identifier##_vec, \
+               .sav = SIDE_PTR_INIT(_identifier##_vec), \
                .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                .len = SIDE_ARRAY_SIZE(_identifier##_vec), \
                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
@@ -1737,7 +1737,7 @@ struct side_event_description {
 #define side_arg_dynamic_define_struct(_identifier, _struct_fields, _attr...) \
        const struct side_arg_dynamic_field _identifier##_fields[] = { _struct_fields }; \
        const struct side_arg_dynamic_struct _identifier = { \
-               .fields = _identifier##_fields, \
+               .fields = SIDE_PTR_INIT(_identifier##_fields), \
                .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                .len = SIDE_ARRAY_SIZE(_identifier##_fields), \
                .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
@@ -1746,13 +1746,13 @@ struct side_event_description {
 #define side_arg_define_vec(_identifier, _sav) \
        const struct side_arg _identifier##_vec[] = { _sav }; \
        const struct side_arg_vec _identifier = { \
-               .sav = _identifier##_vec, \
+               .sav = SIDE_PTR_INIT(_identifier##_vec), \
                .len = SIDE_ARRAY_SIZE(_identifier##_vec), \
        }
 
 #define side_arg_dynamic_field(_name, _elem) \
        { \
-               .field_name = _name, \
+               .field_name = SIDE_PTR_INIT(_name), \
                .elem = _elem, \
        }
 
@@ -1771,7 +1771,7 @@ struct side_event_description {
        { \
                const struct side_arg side_sav[] = { _sav }; \
                const struct side_arg_vec side_arg_vec = { \
-                       .sav = side_sav, \
+                       .sav = SIDE_PTR_INIT(side_sav), \
                        .len = SIDE_ARRAY_SIZE(side_sav), \
                }; \
                side_call(&(_identifier), &side_arg_vec); \
@@ -1785,12 +1785,12 @@ struct side_event_description {
        { \
                const struct side_arg side_sav[] = { _sav }; \
                const struct side_arg_vec side_arg_vec = { \
-                       .sav = side_sav, \
+                       .sav = SIDE_PTR_INIT(side_sav), \
                        .len = SIDE_ARRAY_SIZE(side_sav), \
                }; \
                const struct side_arg_dynamic_field side_fields[] = { _var_fields }; \
                const struct side_arg_dynamic_struct var_struct = { \
-                       .fields = side_fields, \
+                       .fields = SIDE_PTR_INIT(side_fields), \
                        .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                        .len = SIDE_ARRAY_SIZE(side_fields), \
                        .nr_attr = SIDE_ARRAY_SIZE(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
@@ -1811,10 +1811,10 @@ struct side_event_description {
        }; \
        _linkage struct side_event_description __attribute__((section("side_event_description"))) \
                        _identifier = { \
-               .state = &(side_event_state__##_identifier), \
-               .provider_name = _provider, \
-               .event_name = _event, \
-               .fields = _fields, \
+               .state = SIDE_PTR_INIT(&(side_event_state__##_identifier)), \
+               .provider_name = SIDE_PTR_INIT(_provider), \
+               .event_name = SIDE_PTR_INIT(_event), \
+               .fields = SIDE_PTR_INIT(_fields), \
                .attr = SIDE_PTR_INIT(SIDE_PARAM_SELECT_ARG1(_, ##_attr, side_attr_list())), \
                .flags = (_flags), \
                .version = 0, \
This page took 0.03527 seconds and 4 git commands to generate.