Clean-up: ust-consumerd: remove stub of removed function
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.hpp
CommitLineData
3bd1e081 1/*
21cf9b6b 2 * Copyright (C) 2011 EfficiOS Inc.
ab5be9fa 3 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3bd1e081 4 *
ab5be9fa 5 * SPDX-License-Identifier: GPL-2.0-only
3bd1e081 6 *
3bd1e081
MD
7 */
8
9#ifndef _LTTNG_USTCONSUMER_H
10#define _LTTNG_USTCONSUMER_H
11
c9e313bc
SM
12#include <common/compat/errno.hpp>
13#include <common/consumer/consumer.hpp>
02d02e31 14#include <stdbool.h>
10a8a223 15
74d0b642 16#ifdef HAVE_LIBLTTNG_UST_CTL
3bd1e081 17
ffe60014 18int lttng_ustconsumer_take_snapshot(struct lttng_consumer_stream *stream);
e9404c27
JG
19int lttng_ustconsumer_sample_snapshot_positions(
20 struct lttng_consumer_stream *stream);
3bd1e081 21
3bd1e081 22int lttng_ustconsumer_get_produced_snapshot(
ffe60014 23 struct lttng_consumer_stream *stream, unsigned long *pos);
10a50311
JD
24int lttng_ustconsumer_get_consumed_snapshot(
25 struct lttng_consumer_stream *stream, unsigned long *pos);
3bd1e081
MD
26
27int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
28 int sock, struct pollfd *consumer_sockpoll);
29
3bd1e081 30extern void lttng_ustconsumer_del_channel(struct lttng_consumer_channel *chan);
b83e03c4 31extern void lttng_ustconsumer_free_channel(struct lttng_consumer_channel *chan);
e316aad5 32extern int lttng_ustconsumer_add_stream(struct lttng_consumer_stream *stream);
3bd1e081
MD
33extern void lttng_ustconsumer_del_stream(struct lttng_consumer_stream *stream);
34
d41f73b7 35int lttng_ustconsumer_read_subbuffer(struct lttng_consumer_stream *stream,
d2956687 36 struct lttng_consumer_local_data *ctx);
d41f73b7
MD
37int lttng_ustconsumer_on_recv_stream(struct lttng_consumer_stream *stream);
38
d056b477
MD
39void lttng_ustconsumer_on_stream_hangup(struct lttng_consumer_stream *stream);
40
881fc67f
MD
41int lttng_ust_flush_buffer(struct lttng_consumer_stream *stream,
42 int producer_active);
43int lttng_ustconsumer_get_stream_id(struct lttng_consumer_stream *stream,
44 uint64_t *stream_id);
6d805429 45int lttng_ustconsumer_data_pending(struct lttng_consumer_stream *stream);
6d574024
DG
46void lttng_ustconsumer_close_all_metadata(struct lttng_ht *ht);
47void lttng_ustconsumer_close_metadata(struct lttng_consumer_channel *metadata);
d8ef542d 48void lttng_ustconsumer_close_stream_wakeup(struct lttng_consumer_stream *stream);
331744e3 49int lttng_ustconsumer_recv_metadata(int sock, uint64_t key, uint64_t offset,
93ec662e
JD
50 uint64_t len, uint64_t version,
51 struct lttng_consumer_channel *channel, int timer, int wait);
331744e3 52int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx,
94d49140 53 struct lttng_consumer_channel *channel, int timer, int wait);
577eea73
JG
54enum sync_metadata_status lttng_ustconsumer_sync_metadata(
55 struct lttng_consumer_local_data *ctx,
94d49140 56 struct lttng_consumer_stream *metadata);
881fc67f 57int lttng_ustconsumer_flush_buffer(struct lttng_consumer_stream *stream,
84a182ce 58 int producer);
881fc67f 59int lttng_ustconsumer_clear_buffer(struct lttng_consumer_stream *stream);
84a182ce
DG
60int lttng_ustconsumer_get_current_timestamp(
61 struct lttng_consumer_stream *stream, uint64_t *ts);
fb83fe64
JD
62int lttng_ustconsumer_get_sequence_number(
63 struct lttng_consumer_stream *stream, uint64_t *seq);
881fc67f 64void lttng_ustconsumer_sigbus_handle(void *addr);
f02e1e8a 65
74d0b642 66#else /* HAVE_LIBLTTNG_UST_CTL */
3bd1e081
MD
67
68static inline
4078b776 69ssize_t lttng_ustconsumer_on_read_subbuffer_mmap(
f46376a1
MJ
70 struct lttng_consumer_local_data *ctx __attribute__((unused)),
71 struct lttng_consumer_stream *stream __attribute__((unused)),
72 unsigned long len __attribute__((unused)),
73 unsigned long padding __attribute__((unused)))
3bd1e081
MD
74{
75 return -ENOSYS;
76}
77
78static inline
4078b776 79ssize_t lttng_ustconsumer_on_read_subbuffer_splice(
f46376a1
MJ
80 struct lttng_consumer_local_data *ctx __attribute__((unused)),
81 struct lttng_consumer_stream *uststream __attribute__((unused)),
82 unsigned long len __attribute__((unused)),
83 unsigned long padding __attribute__((unused)))
3bd1e081
MD
84{
85 return -ENOSYS;
86}
87
88static inline
f46376a1
MJ
89int lttng_ustconsumer_take_snapshot(
90 struct lttng_consumer_stream *stream __attribute__((unused)))
3bd1e081
MD
91{
92 return -ENOSYS;
93}
94
e9404c27
JG
95static inline
96int lttng_ustconsumer_sample_snapshot_positions(
f46376a1 97 struct lttng_consumer_stream *stream __attribute__((unused)))
e9404c27
JG
98{
99 return -ENOSYS;
100}
101
3bd1e081
MD
102static inline
103int lttng_ustconsumer_get_produced_snapshot(
f46376a1
MJ
104 struct lttng_consumer_stream *stream __attribute__((unused)),
105 unsigned long *pos __attribute__((unused)))
3bd1e081
MD
106{
107 return -ENOSYS;
108}
109
e9404c27
JG
110static inline
111int lttng_ustconsumer_get_consumed_snapshot(
f46376a1
MJ
112 struct lttng_consumer_stream *stream __attribute__((unused)),
113 unsigned long *pos __attribute__((unused)))
e9404c27
JG
114{
115 return -ENOSYS;
116}
117
3bd1e081 118static inline
f46376a1
MJ
119int lttng_ustconsumer_recv_cmd(
120 struct lttng_consumer_local_data *ctx __attribute__((unused)),
121 int sock __attribute__((unused)),
122 struct pollfd *consumer_sockpoll __attribute__((unused)))
fbc72522
DG
123{
124 return -ENOSYS;
125}
3bd1e081 126
3bd1e081 127static inline
f46376a1
MJ
128void lttng_ustconsumer_del_channel(
129 struct lttng_consumer_channel *chan __attribute__((unused)))
3bd1e081
MD
130{
131}
132
b83e03c4 133static inline
f46376a1
MJ
134void lttng_ustconsumer_free_channel(
135 struct lttng_consumer_channel *chan __attribute__((unused)))
b83e03c4
MD
136{
137}
138
3bd1e081 139static inline
f46376a1
MJ
140int lttng_ustconsumer_add_stream(
141 struct lttng_consumer_stream *stream __attribute__((unused)))
3bd1e081
MD
142{
143 return -ENOSYS;
144}
145
146static inline
f46376a1
MJ
147void lttng_ustconsumer_del_stream(
148 struct lttng_consumer_stream *stream __attribute__((unused)))
3bd1e081
MD
149{
150}
151
d41f73b7 152static inline
f46376a1
MJ
153int lttng_ustconsumer_read_subbuffer(
154 struct lttng_consumer_stream *stream __attribute__((unused)),
155 struct lttng_consumer_local_data *ctx __attribute__((unused)))
d41f73b7
MD
156{
157 return -ENOSYS;
158}
159
160static inline
f46376a1
MJ
161int lttng_ustconsumer_on_recv_stream(
162 struct lttng_consumer_stream *stream __attribute__((unused)))
d41f73b7
MD
163{
164 return -ENOSYS;
165}
166
d056b477 167static inline
f46376a1
MJ
168void lttng_ustconsumer_on_stream_hangup(
169 struct lttng_consumer_stream *stream __attribute__((unused)))
d056b477
MD
170{
171}
172
ca22feea 173static inline
f46376a1
MJ
174int lttng_ustconsumer_data_pending(
175 struct lttng_consumer_stream *stream __attribute__((unused)))
ca22feea
DG
176{
177 return -ENOSYS;
178}
f46376a1 179
ffe60014 180static inline
f46376a1
MJ
181int lttng_ust_flush_buffer(struct lttng_consumer_stream *stream __attribute__((unused)),
182 int producer_active __attribute__((unused)))
fc6d7a51 183{
881fc67f 184 return -ENOSYS;
fc6d7a51 185}
f46376a1 186
fc6d7a51 187static inline
f46376a1
MJ
188void lttng_ustconsumer_close_all_metadata(
189 struct lttng_ht *ht __attribute__((unused)))
6d574024
DG
190{
191}
f46376a1 192
6d574024 193static inline
f46376a1
MJ
194void lttng_ustconsumer_close_metadata(
195 struct lttng_consumer_channel *metadata __attribute__((unused)))
d88aee68
DG
196{
197}
d8ef542d 198static inline
f46376a1
MJ
199void lttng_ustconsumer_close_stream_wakeup(
200 struct lttng_consumer_stream *stream __attribute__((unused)))
d8ef542d
MD
201{
202}
f46376a1 203
ee69440b 204static inline
f46376a1
MJ
205int lttng_ustconsumer_recv_metadata(int sock __attribute__((unused)),
206 uint64_t key __attribute__((unused)),
207 uint64_t offset __attribute__((unused)),
208 uint64_t len __attribute__((unused)),
209 uint64_t version __attribute__((unused)),
210 struct lttng_consumer_channel *channel __attribute__((unused)),
211 int timer __attribute__((unused)))
ee69440b
DG
212{
213 return -ENOSYS;
214}
f46376a1 215
ee69440b 216static inline
f46376a1
MJ
217int lttng_ustconsumer_request_metadata(
218 struct lttng_consumer_local_data *ctx __attribute__((unused)),
219 struct lttng_consumer_channel *channel __attribute__((unused)),
220 int timer __attribute__((unused)),
221 int wait __attribute__((unused)))
ee69440b
DG
222{
223 return -ENOSYS;
224}
f46376a1 225
94d49140 226static inline
f46376a1
MJ
227enum sync_metadata_status lttng_ustconsumer_sync_metadata(
228 struct lttng_consumer_local_data *ctx __attribute__((unused)),
229 struct lttng_consumer_stream *metadata __attribute__((unused)))
94d49140 230{
577eea73 231 return SYNC_METADATA_STATUS_ERROR;
94d49140 232}
f46376a1 233
84a182ce 234static inline
f46376a1
MJ
235int lttng_ustconsumer_flush_buffer(
236 struct lttng_consumer_stream *stream __attribute__((unused)),
237 int producer __attribute__((unused)))
84a182ce 238{
881fc67f 239 return -ENOSYS;
84a182ce 240}
f46376a1 241
84a182ce 242static inline
f46376a1
MJ
243int lttng_ustconsumer_clear_buffer(
244 struct lttng_consumer_stream *stream __attribute__((unused)))
214f70e0 245{
881fc67f 246 return -ENOSYS;
214f70e0 247}
f46376a1 248
214f70e0 249static inline
84a182ce 250int lttng_ustconsumer_get_current_timestamp(
f46376a1
MJ
251 struct lttng_consumer_stream *stream __attribute__((unused)),
252 uint64_t *ts __attribute__((unused)))
84a182ce
DG
253{
254 return -ENOSYS;
255}
f46376a1 256
a31c9f22 257static inline
fb83fe64 258int lttng_ustconsumer_get_sequence_number(
f46376a1
MJ
259 struct lttng_consumer_stream *stream __attribute__((unused)),
260 uint64_t *seq __attribute__((unused)))
fb83fe64
JD
261{
262 return -ENOSYS;
263}
f46376a1 264
70190e1c 265static inline
f46376a1
MJ
266int lttng_ustconsumer_get_stream_id(
267 struct lttng_consumer_stream *stream __attribute__((unused)),
268 uint64_t *stream_id __attribute__((unused)))
70190e1c
DG
269{
270 return -ENOSYS;
271}
f46376a1 272
881fc67f 273static inline
f46376a1
MJ
274void lttng_ustconsumer_sigbus_handle(
275 void *addr __attribute__((unused)))
881fc67f
MD
276{
277}
74d0b642 278#endif /* HAVE_LIBLTTNG_UST_CTL */
3bd1e081
MD
279
280#endif /* _LTTNG_USTCONSUMER_H */
This page took 0.092576 seconds and 4 git commands to generate.