X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fcommon%2Fust-context-provider.h;h=43e75b4bcdaa448812dfb2c3e6790aaaba12aea1;hb=f1e09e2c97ea5461b42412f9b7c49a1162a277ed;hp=c9362fb1fc46eca469d3579094e4b5f24cc06137;hpb=b5457df5fd74e033cbaa75307f9bbc12aff4ab8f;p=lttng-ust.git diff --git a/src/common/ust-context-provider.h b/src/common/ust-context-provider.h index c9362fb1..43e75b4b 100644 --- a/src/common/ust-context-provider.h +++ b/src/common/ust-context-provider.h @@ -17,6 +17,7 @@ #include "common/dynamic-type.h" struct lttng_ust_registered_context_provider; +struct lttng_ust_probe_ctx; /* * Context value @@ -54,15 +55,39 @@ struct lttng_ust_context_provider { uint32_t struct_size; const char *name; - size_t (*get_size)(void *priv, size_t offset); - void (*record)(void *priv, struct lttng_ust_ring_buffer_ctx *ctx, - struct lttng_ust_channel_buffer *chan); - void (*get_value)(void *priv, struct lttng_ust_ctx_value *value); + size_t (*get_size)(void *priv, struct lttng_ust_probe_ctx *probe_ctx, + size_t offset); + void (*record)(void *priv, struct lttng_ust_probe_ctx *probe_ctx, + struct lttng_ust_ring_buffer_ctx *ctx, + struct lttng_ust_channel_buffer *chan); + void (*get_value)(void *priv, struct lttng_ust_probe_ctx *probe_ctx, + struct lttng_ust_ctx_value *value); void *priv; /* End of base ABI. Fields below should be used after checking struct_size. */ }; +/* + * Application context callback private data + * + * IMPORTANT: this structure is part of the ABI between the probe and + * UST. Fields need to be only added at the end, never reordered, never + * removed. + * + * The field @struct_size should be used to determine the size of the + * structure. It should be queried before using additional fields added + * at the end of the structure. + */ + +struct lttng_ust_app_context { + uint32_t struct_size; + + struct lttng_ust_event_field *event_field; + char *ctx_name; + + /* End of base ABI. Fields below should be used after checking struct_size. */ +}; + /* * Returns an opaque pointer on success, which must be passed to * lttng_ust_context_provider_unregister for unregistration. Returns