Use "_sg_" as prefix to type rather than suffix
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 5 Nov 2022 01:31:53 +0000 (21:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 5 Nov 2022 01:31:53 +0000 (21:31 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/side/trace.h
src/test.c

index aaa31b3cc07d4cf7fa4c2e3c49275258d6705aee..bb07f6826134f705e6fbbed87a8933fca4a9e810 100644 (file)
@@ -888,7 +888,7 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 #define side_field_sg_float_be(_name, _offset, _float_size_bits, _attr) \
        _side_field(_name, side_type_sg_float_be(_offset, _float_size_bits, _attr))
 
-#define side_type_struct_sg(_struct_sg, _offset) \
+#define side_type_sg_struct(_struct_sg, _offset) \
        { \
                .type = SIDE_TYPE_SG_STRUCT, \
                .u = { \
@@ -900,8 +900,8 @@ struct side_tracer_dynamic_vla_visitor_ctx {
                        }, \
                }, \
        }
-#define side_field_struct_sg(_name, _struct_sg, _offset) \
-       _side_field(_name, side_type_struct_sg(SIDE_PARAM(_struct_sg), _offset))
+#define side_field_sg_struct(_name, _struct_sg, _offset) \
+       _side_field(_name, side_type_sg_struct(SIDE_PARAM(_struct_sg), _offset))
 
 #define side_type_array(_elem_type, _length, _attr) \
        { \
@@ -981,10 +981,10 @@ struct side_tracer_dynamic_vla_visitor_ctx {
 #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_sg(_ptr)       { .type = SIDE_TYPE_SG_STRUCT, .u = { .side_static = { .side_struct_sg_ptr = (_ptr) } } }
-#define side_arg_unsigned_integer_sg(_ptr)     { .type = SIDE_TYPE_SG_UNSIGNED_INT, .u = { .side_static = { .side_integer_sg_ptr = (_ptr) } } }
-#define side_arg_signed_integer_sg(_ptr)       { .type = SIDE_TYPE_SG_SIGNED_INT, .u = { .side_static = { .side_integer_sg_ptr = (_ptr) } } }
-#define side_arg_float_sg(_ptr)                { .type = SIDE_TYPE_SG_FLOAT, .u = { .side_static = { .side_float_sg_ptr = (_ptr) } } }
+#define side_arg_sg_struct(_ptr)       { .type = SIDE_TYPE_SG_STRUCT, .u = { .side_static = { .side_struct_sg_ptr = (_ptr) } } }
+#define side_arg_sg_unsigned_integer(_ptr)     { .type = SIDE_TYPE_SG_UNSIGNED_INT, .u = { .side_static = { .side_integer_sg_ptr = (_ptr) } } }
+#define side_arg_sg_signed_integer(_ptr)       { .type = SIDE_TYPE_SG_SIGNED_INT, .u = { .side_static = { .side_integer_sg_ptr = (_ptr) } } }
+#define side_arg_sg_float(_ptr)                { .type = SIDE_TYPE_SG_FLOAT, .u = { .side_static = { .side_float_sg_ptr = (_ptr) } } }
 #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_vla_visitor(_ctx)     { .type = SIDE_TYPE_VLA_VISITOR, .u = { .side_static = { .side_vla_app_visitor_ctx = (_ctx) } } }
index c0f0b86865188f22a38feb728c30244713eb5aa3..a95d78047524a6a4652288df3e9a6c9730f76677 100644 (file)
@@ -1519,7 +1519,7 @@ static side_define_struct(mystructsgdef,
 
 side_static_event(my_provider_event_structsg, "myprovider", "myeventstructsg", SIDE_LOGLEVEL_DEBUG,
        side_field_list(
-               side_field_struct_sg("structsg", &mystructsgdef, 0),
+               side_field_sg_struct("structsg", &mystructsgdef, 0),
                side_field_sg_signed_integer("intsg", 0, 32, 0, 32,
                        side_attr_list(side_attr("std.integer.base", side_attr_u8(10)))),
 #if __HAVE_FLOAT32
@@ -1553,10 +1553,10 @@ void test_struct_sg(void)
 #endif
                side_event_call(my_provider_event_structsg,
                        side_arg_list(
-                               side_arg_struct_sg(&mystruct),
-                               side_arg_signed_integer_sg(&val),
+                               side_arg_sg_struct(&mystruct),
+                               side_arg_sg_signed_integer(&val),
 #if __HAVE_FLOAT32
-                               side_arg_float_sg(&f32),
+                               side_arg_sg_float(&f32),
 #endif
                        )
                );
@@ -1591,7 +1591,7 @@ static side_define_struct(mystructsgnest1,
                side_field_sg_unsigned_integer("b", offsetof(struct testnest1, b),
                        side_struct_field_sizeof_bit(struct testnest1, b), 0,
                        side_struct_field_sizeof_bit(struct testnest1, b), side_attr_list()),
-               side_field_struct_sg("nest2", &mystructsgnest2,
+               side_field_sg_struct("nest2", &mystructsgnest2,
                        offsetof(struct testnest1, nest)),
        ),
        side_attr_list()
@@ -1602,7 +1602,7 @@ static side_define_struct(mystructsgnest0,
                side_field_sg_unsigned_integer("a", offsetof(struct testnest0, a),
                        side_struct_field_sizeof_bit(struct testnest0, a), 0,
                        side_struct_field_sizeof_bit(struct testnest0, a), side_attr_list()),
-               side_field_struct_sg("nest1", &mystructsgnest1,
+               side_field_sg_struct("nest1", &mystructsgnest1,
                        offsetof(struct testnest0, nest)),
        ),
        side_attr_list()
@@ -1611,7 +1611,7 @@ static side_define_struct(mystructsgnest0,
 side_static_event(my_provider_event_structsg_nest,
        "myprovider", "myeventstructsgnest", SIDE_LOGLEVEL_DEBUG,
        side_field_list(
-               side_field_struct_sg("nest0", &mystructsgnest0, 0),
+               side_field_sg_struct("nest0", &mystructsgnest0, 0),
        ),
        side_attr_list()
 );
@@ -1633,7 +1633,7 @@ void test_struct_sg_nest(void)
                };
                side_event_call(my_provider_event_structsg_nest,
                        side_arg_list(
-                               side_arg_struct_sg(&mystruct),
+                               side_arg_sg_struct(&mystruct),
                        )
                );
        }
@@ -1679,7 +1679,7 @@ static side_define_struct(mystructsgfloat,
 side_static_event(my_provider_event_structsgfloat,
        "myprovider", "myeventstructsgfloat", SIDE_LOGLEVEL_DEBUG,
        side_field_list(
-               side_field_struct_sg("structsgfloat", &mystructsgfloat, 0),
+               side_field_sg_struct("structsgfloat", &mystructsgfloat, 0),
        ),
        side_attr_list()
 );
@@ -1704,7 +1704,7 @@ void test_struct_sg_float(void)
                };
                side_event_call(my_provider_event_structsgfloat,
                        side_arg_list(
-                               side_arg_struct_sg(&mystruct),
+                               side_arg_sg_struct(&mystruct),
                        )
                );
        }
This page took 0.029584 seconds and 4 git commands to generate.