Commit | Line | Data |
---|---|---|
7591bab1 MD |
1 | #ifndef LTTNG_RELAYD_H |
2 | #define LTTNG_RELAYD_H | |
3 | ||
b8aa1682 | 4 | /* |
ab5be9fa MJ |
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> | |
b8aa1682 | 8 | * |
ab5be9fa | 9 | * SPDX-License-Identifier: GPL-2.0-only |
b8aa1682 | 10 | * |
b8aa1682 JD |
11 | */ |
12 | ||
d3e2ba59 | 13 | #include <limits.h> |
b8aa1682 | 14 | #include <urcu.h> |
8bdee6e2 | 15 | #include <urcu/wfcqueue.h> |
d3e2ba59 | 16 | |
0f907de1 | 17 | #include <common/hashtable/hashtable.h> |
00e3b7f1 | 18 | #include <common/fd-tracker/fd-tracker.h> |
d3e2ba59 | 19 | |
23c8ff50 JG |
20 | struct sessiond_trace_chunk_registry; |
21 | ||
b8aa1682 JD |
22 | /* |
23 | * Queue used to enqueue relay requests | |
24 | */ | |
58eb9381 | 25 | struct relay_conn_queue { |
8bdee6e2 SM |
26 | struct cds_wfcq_head head; |
27 | struct cds_wfcq_tail tail; | |
7717e361 | 28 | int32_t futex; |
b8aa1682 JD |
29 | }; |
30 | ||
a8b66566 JR |
31 | enum relay_group_output_by { |
32 | RELAYD_GROUP_OUTPUT_BY_UNKNOWN, | |
33 | RELAYD_GROUP_OUTPUT_BY_HOST, | |
34 | RELAYD_GROUP_OUTPUT_BY_SESSION, | |
35 | }; | |
36 | ||
2a174661 DG |
37 | /* |
38 | * Contains stream indexed by ID. This is important since many commands lookup | |
39 | * streams only by ID thus also keeping them in this hash table makes the | |
7591bab1 | 40 | * search O(1). |
2a174661 | 41 | */ |
7591bab1 | 42 | extern struct lttng_ht *sessions_ht; |
d3e2ba59 | 43 | extern struct lttng_ht *relay_streams_ht; |
92c6ca54 | 44 | extern struct lttng_ht *viewer_streams_ht; |
23c8ff50 | 45 | extern struct sessiond_trace_chunk_registry *sessiond_trace_chunk_registry; |
d3e2ba59 | 46 | |
7591bab1 | 47 | extern char *opt_output_path; |
65931c8b | 48 | extern const char *tracing_group_name; |
cd60b05a | 49 | extern const char * const config_section_name; |
a8b66566 | 50 | extern enum relay_group_output_by opt_group_output_by; |
cd60b05a | 51 | |
bcf4a440 DG |
52 | extern int thread_quit_pipe[2]; |
53 | ||
00e3b7f1 JG |
54 | extern struct fd_tracker *the_fd_tracker; |
55 | ||
3fd27398 | 56 | void lttng_relay_notify_ready(void); |
b4aacfdc | 57 | int lttng_relay_stop_threads(void); |
d3e2ba59 | 58 | |
7717e361 | 59 | #endif /* LTTNG_RELAYD_H */ |