Commit | Line | Data |
---|---|---|
7591bab1 MD |
1 | #ifndef LTTNG_RELAYD_H |
2 | #define LTTNG_RELAYD_H | |
3 | ||
b8aa1682 JD |
4 | /* |
5 | * Copyright (C) 2012 - Julien Desfossez <jdesfossez@efficios.com> | |
6 | * David Goulet <dgoulet@efficios.com> | |
7591bab1 | 7 | * 2015 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
b8aa1682 JD |
8 | * |
9 | * This program is free software; you can redistribute it and/or modify | |
10 | * it under the terms of the GNU General Public License, version 2 only, | |
11 | * as published by the Free Software Foundation. | |
12 | * | |
13 | * This program is distributed in the hope that it will be useful, but WITHOUT | |
14 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
16 | * more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License along | |
19 | * with this program; if not, write to the Free Software Foundation, Inc., | |
20 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
21 | */ | |
22 | ||
d3e2ba59 | 23 | #include <limits.h> |
b8aa1682 | 24 | #include <urcu.h> |
8bdee6e2 | 25 | #include <urcu/wfcqueue.h> |
d3e2ba59 | 26 | |
0f907de1 | 27 | #include <common/hashtable/hashtable.h> |
d3e2ba59 | 28 | |
23c8ff50 JG |
29 | struct sessiond_trace_chunk_registry; |
30 | ||
b8aa1682 JD |
31 | /* |
32 | * Queue used to enqueue relay requests | |
33 | */ | |
58eb9381 | 34 | struct relay_conn_queue { |
8bdee6e2 SM |
35 | struct cds_wfcq_head head; |
36 | struct cds_wfcq_tail tail; | |
7717e361 | 37 | int32_t futex; |
b8aa1682 JD |
38 | }; |
39 | ||
2a174661 DG |
40 | /* |
41 | * Contains stream indexed by ID. This is important since many commands lookup | |
42 | * streams only by ID thus also keeping them in this hash table makes the | |
7591bab1 | 43 | * search O(1). |
2a174661 | 44 | */ |
7591bab1 | 45 | extern struct lttng_ht *sessions_ht; |
d3e2ba59 | 46 | extern struct lttng_ht *relay_streams_ht; |
92c6ca54 | 47 | extern struct lttng_ht *viewer_streams_ht; |
23c8ff50 | 48 | extern struct sessiond_trace_chunk_registry *sessiond_trace_chunk_registry; |
d3e2ba59 | 49 | |
7591bab1 | 50 | extern char *opt_output_path; |
65931c8b | 51 | extern const char *tracing_group_name; |
cd60b05a JG |
52 | extern const char * const config_section_name; |
53 | ||
bcf4a440 DG |
54 | extern int thread_quit_pipe[2]; |
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 */ |