Move lttng_ust_dl_update to private ABI
[lttng-ust.git] / include / ust-context-provider.h
CommitLineData
53569322 1/*
c0c0989a 2 * SPDX-License-Identifier: MIT
53569322 3 *
c0c0989a 4 * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
28b9540b
MJ
5 *
6 * The context provider feature is part of the ABI and used by the Java jni
7 * interface. This header should be moved to the public header directory once
8 * some test code and documentation is written.
53569322
MD
9 */
10
c0c0989a
MJ
11#ifndef _LTTNG_UST_CONTEXT_PROVIDER_H
12#define _LTTNG_UST_CONTEXT_PROVIDER_H
13
b4051ad8 14#include <stddef.h>
53569322
MD
15#include <lttng/ust-events.h>
16#include <urcu/hlist.h>
17
18struct lttng_ust_context_provider {
19 char *name;
20 size_t (*get_size)(struct lttng_ctx_field *field, size_t offset);
21 void (*record)(struct lttng_ctx_field *field,
22 struct lttng_ust_lib_ring_buffer_ctx *ctx,
23 struct lttng_channel *chan);
24 void (*get_value)(struct lttng_ctx_field *field,
25 struct lttng_ctx_value *value);
26 struct cds_hlist_node node;
27};
28
29int lttng_ust_context_provider_register(struct lttng_ust_context_provider *provider);
30void lttng_ust_context_provider_unregister(struct lttng_ust_context_provider *provider);
31
53569322
MD
32void lttng_ust_context_set_session_provider(const char *name,
33 size_t (*get_size)(struct lttng_ctx_field *field, size_t offset),
34 void (*record)(struct lttng_ctx_field *field,
35 struct lttng_ust_lib_ring_buffer_ctx *ctx,
36 struct lttng_channel *chan),
37 void (*get_value)(struct lttng_ctx_field *field,
38 struct lttng_ctx_value *value));
39
40int lttng_ust_add_app_context_to_ctx_rcu(const char *name, struct lttng_ctx **ctx);
41int lttng_ust_context_set_provider_rcu(struct lttng_ctx **_ctx,
42 const char *name,
43 size_t (*get_size)(struct lttng_ctx_field *field, size_t offset),
44 void (*record)(struct lttng_ctx_field *field,
45 struct lttng_ust_lib_ring_buffer_ctx *ctx,
46 struct lttng_channel *chan),
47 void (*get_value)(struct lttng_ctx_field *field,
48 struct lttng_ctx_value *value));
53569322
MD
49
50#endif /* _LTTNG_UST_CONTEXT_PROVIDER_H */
This page took 0.027314 seconds and 4 git commands to generate.