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> |
f27f1026 | 11 | #include "../libringbuffer/ringbuffer-config.h" |
fb31eb73 | 12 | |
82b9bde8 JD |
13 | struct lttng_ust_client_lib_ring_buffer_client_cb { |
14 | struct lttng_ust_lib_ring_buffer_client_cb parent; | |
b2f3252a JD |
15 | |
16 | int (*timestamp_begin) (struct lttng_ust_lib_ring_buffer *buf, | |
07539b34 | 17 | struct lttng_ust_lib_ring_buffer_channel *chan, |
b2f3252a JD |
18 | uint64_t *timestamp_begin); |
19 | int (*timestamp_end) (struct lttng_ust_lib_ring_buffer *buf, | |
07539b34 | 20 | struct lttng_ust_lib_ring_buffer_channel *chan, |
b2f3252a JD |
21 | uint64_t *timestamp_end); |
22 | int (*events_discarded) (struct lttng_ust_lib_ring_buffer *buf, | |
07539b34 | 23 | struct lttng_ust_lib_ring_buffer_channel *chan, |
b2f3252a JD |
24 | uint64_t *events_discarded); |
25 | int (*content_size) (struct lttng_ust_lib_ring_buffer *buf, | |
07539b34 | 26 | struct lttng_ust_lib_ring_buffer_channel *chan, |
b2f3252a JD |
27 | uint64_t *content_size); |
28 | int (*packet_size) (struct lttng_ust_lib_ring_buffer *buf, | |
07539b34 | 29 | struct lttng_ust_lib_ring_buffer_channel *chan, |
b2f3252a JD |
30 | uint64_t *packet_size); |
31 | int (*stream_id) (struct lttng_ust_lib_ring_buffer *buf, | |
07539b34 | 32 | struct lttng_ust_lib_ring_buffer_channel *chan, |
b2f3252a | 33 | uint64_t *stream_id); |
fca361e8 | 34 | int (*current_timestamp) (struct lttng_ust_lib_ring_buffer *buf, |
07539b34 | 35 | struct lttng_ust_lib_ring_buffer_channel *chan, |
fca361e8 | 36 | uint64_t *ts); |
1ff31389 | 37 | int (*sequence_number) (struct lttng_ust_lib_ring_buffer *buf, |
07539b34 | 38 | struct lttng_ust_lib_ring_buffer_channel *chan, uint64_t *seq); |
45a00b05 | 39 | int (*instance_id) (struct lttng_ust_lib_ring_buffer *buf, |
07539b34 | 40 | struct lttng_ust_lib_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 */ |