Fix: convey enum value signedness into metadata
[lttng-tools.git] / src / bin / lttng-sessiond / lttng-ust-ctl.h
index 73a9244187aa9c6aef8536749439cd6482e6228b..b8cf775e382a38a72d0c64428fd9b6c95d2abd7e 100644 (file)
@@ -59,6 +59,17 @@ struct ustctl_consumer_channel_attr {
  * API used by sessiond.
  */
 
+struct lttng_ust_context_attr {
+       enum lttng_ust_context_type ctx;
+       union {
+               struct lttng_ust_perf_counter_ctx perf_counter;
+               struct {
+                       char *provider_name;
+                       char *ctx_name;
+               } app_ctx;
+       } u;
+};
+
 /*
  * Error values: all the following functions return:
  * >= 0: Success (LTTNG_UST_OK)
@@ -69,7 +80,7 @@ int ustctl_create_session(int sock);
 int ustctl_create_event(int sock, struct lttng_ust_event *ev,
                struct lttng_ust_object_data *channel_data,
                struct lttng_ust_object_data **event_data);
-int ustctl_add_context(int sock, struct lttng_ust_context *ctx,
+int ustctl_add_context(int sock, struct lttng_ust_context_attr *ctx,
                struct lttng_ust_object_data *obj_data,
                struct lttng_ust_object_data **context_data);
 int ustctl_set_filter(int sock, struct lttng_ust_filter_bytecode *bytecode,
@@ -275,12 +286,19 @@ struct ustctl_float_type {
        char padding[USTCTL_UST_FLOAT_TYPE_PADDING];
 } LTTNG_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;
+
 #define USTCTL_UST_ENUM_ENTRY_PADDING  32
 struct ustctl_enum_entry {
-       uint64_t start, end;            /* start and end are inclusive */
+       struct ustctl_enum_value start, end; /* start and end are inclusive */
        char string[LTTNG_UST_SYM_NAME_LEN];
        char padding[USTCTL_UST_ENUM_ENTRY_PADDING];
-};
+} LTTNG_PACKED;
 
 #define USTCTL_UST_BASIC_TYPE_PADDING  296
 union _ustctl_basic_type {
This page took 0.02374 seconds and 4 git commands to generate.