Add ctf_enum_auto() for autoincrementing enumeration values
[lttng-modules.git] / probes / lttng-tracepoint-event-impl.h
index ed7072cf19377973de61f38e12b0547a1bf13d36..e1c408298fea396ceda470dcc12f8a10a735654d 100644 (file)
@@ -222,6 +222,24 @@ void __event_template_proto___##_name(void);
                .string = (_string),                                    \
        },
 
+/* Enumeration entry (automatic value; follows the rules of CTF) */
+#undef ctf_enum_auto
+#define ctf_enum_auto(_string)                                 \
+       {                                                               \
+               .start = {                                              \
+                       .signedness = -1,                               \
+                       .value = -1,                                    \
+               },                                                      \
+               .end = {                                                \
+                       .signedness = -1,                               \
+                       .value = -1,                                    \
+               },                                                      \
+               .string = (_string),                                    \
+               .options = {                                            \
+                       .is_auto = 1,                                   \
+               }                                                       \
+       },
+
 #undef TP_ENUM_VALUES
 #define TP_ENUM_VALUES(...)                                            \
        __VA_ARGS__
This page took 0.022805 seconds and 4 git commands to generate.