Commit | Line | Data |
---|---|---|
82b9bde8 | 1 | /* |
c0c0989a | 2 | * SPDX-License-Identifier: LGPL-2.1-only |
82b9bde8 | 3 | * |
c0c0989a | 4 | * Copyright (C) 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
82b9bde8 JD |
5 | */ |
6 | ||
c0c0989a MJ |
7 | #ifndef _LTTNG_RB_CLIENT_H |
8 | #define _LTTNG_RB_CLIENT_H | |
9 | ||
fb31eb73 | 10 | #include <stdint.h> |
e4db8f98 | 11 | #include "common/ringbuffer/ringbuffer-config.h" |
fb31eb73 | 12 | |
82b9bde8 | 13 | struct lttng_ust_client_lib_ring_buffer_client_cb { |
b5457df5 | 14 | struct lttng_ust_ring_buffer_client_cb parent; |
b2f3252a | 15 | |
b5457df5 MD |
16 | int (*timestamp_begin) (struct lttng_ust_ring_buffer *buf, |
17 | struct lttng_ust_ring_buffer_channel *chan, | |
b2f3252a | 18 | uint64_t *timestamp_begin); |
b5457df5 MD |
19 | int (*timestamp_end) (struct lttng_ust_ring_buffer *buf, |
20 | struct lttng_ust_ring_buffer_channel *chan, | |
b2f3252a | 21 | uint64_t *timestamp_end); |
b5457df5 MD |
22 | int (*events_discarded) (struct lttng_ust_ring_buffer *buf, |
23 | struct lttng_ust_ring_buffer_channel *chan, | |
b2f3252a | 24 | uint64_t *events_discarded); |
b5457df5 MD |
25 | int (*content_size) (struct lttng_ust_ring_buffer *buf, |
26 | struct lttng_ust_ring_buffer_channel *chan, | |
b2f3252a | 27 | uint64_t *content_size); |
b5457df5 MD |
28 | int (*packet_size) (struct lttng_ust_ring_buffer *buf, |
29 | struct lttng_ust_ring_buffer_channel *chan, | |
b2f3252a | 30 | uint64_t *packet_size); |
b5457df5 MD |
31 | int (*stream_id) (struct lttng_ust_ring_buffer *buf, |
32 | struct lttng_ust_ring_buffer_channel *chan, | |
b2f3252a | 33 | uint64_t *stream_id); |
b5457df5 MD |
34 | int (*current_timestamp) (struct lttng_ust_ring_buffer *buf, |
35 | struct lttng_ust_ring_buffer_channel *chan, | |
fca361e8 | 36 | uint64_t *ts); |
b5457df5 MD |
37 | int (*sequence_number) (struct lttng_ust_ring_buffer *buf, |
38 | struct lttng_ust_ring_buffer_channel *chan, uint64_t *seq); | |
39 | int (*instance_id) (struct lttng_ust_ring_buffer *buf, | |
40 | struct lttng_ust_ring_buffer_channel *chan, uint64_t *id); | |
82b9bde8 JD |
41 | }; |
42 | ||
14e0a135 | 43 | /* |
f27f1026 MD |
44 | * The ring buffer clients init/exit symbols are private ABI for |
45 | * liblttng-ust-ctl, which is why they are not hidden. | |
14e0a135 MD |
46 | */ |
47 | void lttng_ust_ring_buffer_clients_init(void); | |
48 | void lttng_ust_ring_buffer_clients_exit(void); | |
49 | ||
1d18d519 MJ |
50 | void lttng_ring_buffer_client_overwrite_init(void) |
51 | __attribute__((visibility("hidden"))); | |
52 | ||
53 | void lttng_ring_buffer_client_overwrite_rt_init(void) | |
54 | __attribute__((visibility("hidden"))); | |
55 | ||
56 | void lttng_ring_buffer_client_discard_init(void) | |
57 | __attribute__((visibility("hidden"))); | |
58 | ||
59 | void lttng_ring_buffer_client_discard_rt_init(void) | |
60 | __attribute__((visibility("hidden"))); | |
61 | ||
62 | void lttng_ring_buffer_metadata_client_init(void) | |
63 | __attribute__((visibility("hidden"))); | |
64 | ||
65 | ||
66 | void lttng_ring_buffer_client_overwrite_exit(void) | |
67 | __attribute__((visibility("hidden"))); | |
68 | ||
69 | void lttng_ring_buffer_client_overwrite_rt_exit(void) | |
70 | __attribute__((visibility("hidden"))); | |
71 | ||
72 | void lttng_ring_buffer_client_discard_exit(void) | |
73 | __attribute__((visibility("hidden"))); | |
74 | ||
75 | void lttng_ring_buffer_client_discard_rt_exit(void) | |
76 | __attribute__((visibility("hidden"))); | |
77 | ||
78 | void lttng_ring_buffer_metadata_client_exit(void) | |
79 | __attribute__((visibility("hidden"))); | |
80 | ||
81 | ||
82 | void lttng_ust_fixup_ring_buffer_client_overwrite_tls(void) | |
83 | __attribute__((visibility("hidden"))); | |
84 | ||
85 | void lttng_ust_fixup_ring_buffer_client_overwrite_rt_tls(void) | |
86 | __attribute__((visibility("hidden"))); | |
87 | ||
88 | void lttng_ust_fixup_ring_buffer_client_discard_tls(void) | |
89 | __attribute__((visibility("hidden"))); | |
90 | ||
91 | void lttng_ust_fixup_ring_buffer_client_discard_rt_tls(void) | |
92 | __attribute__((visibility("hidden"))); | |
14e0a135 | 93 | |
82b9bde8 | 94 | #endif /* _LTTNG_RB_CLIENT_H */ |