docs: Add supported versions and fix-backport policy
[lttng-tools.git] / src / bin / lttng-relayd / lttng-relayd.hpp
1 #ifndef LTTNG_RELAYD_H
2 #define LTTNG_RELAYD_H
3
4 /*
5 * Copyright (C) 2012 Julien Desfossez <jdesfossez@efficios.com>
6 * Copyright (C) 2012 David Goulet <dgoulet@efficios.com>
7 * Copyright (C) 2015 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 *
9 * SPDX-License-Identifier: GPL-2.0-only
10 *
11 */
12
13 #include <limits.h>
14 #include <urcu.h>
15 #include <urcu/wfcqueue.h>
16
17 #include <common/compat/poll.hpp>
18 #include <common/hashtable/hashtable.hpp>
19 #include <common/fd-tracker/fd-tracker.hpp>
20
21 struct sessiond_trace_chunk_registry;
22
23 /*
24 * Queue used to enqueue relay requests
25 */
26 struct relay_conn_queue {
27 struct cds_wfcq_head head;
28 struct cds_wfcq_tail tail;
29 int32_t futex;
30 };
31
32 enum relay_group_output_by {
33 RELAYD_GROUP_OUTPUT_BY_UNKNOWN,
34 RELAYD_GROUP_OUTPUT_BY_HOST,
35 RELAYD_GROUP_OUTPUT_BY_SESSION,
36 };
37
38 /*
39 * Contains stream indexed by ID. This is important since many commands lookup
40 * streams only by ID thus also keeping them in this hash table makes the
41 * search O(1).
42 */
43 extern struct lttng_ht *sessions_ht;
44 extern struct lttng_ht *relay_streams_ht;
45 extern struct lttng_ht *viewer_streams_ht;
46 extern struct sessiond_trace_chunk_registry *sessiond_trace_chunk_registry;
47
48 extern char *opt_output_path;
49 extern const char *tracing_group_name;
50 extern const char * const config_section_name;
51 extern enum relay_group_output_by opt_group_output_by;
52
53 extern struct fd_tracker *the_fd_tracker;
54
55 void lttng_relay_notify_ready(void);
56 int lttng_relay_stop_threads(void);
57
58 int relayd_init_thread_quit_pipe(void);
59 int relayd_notify_thread_quit_pipe(void);
60 void relayd_close_thread_quit_pipe(void);
61 bool relayd_is_thread_quit_pipe(const int fd);
62
63 int create_named_thread_poll_set(struct lttng_poll_event *events,
64 int size, const char *name);
65
66 #endif /* LTTNG_RELAYD_H */
This page took 0.029994 seconds and 4 git commands to generate.