Backport: relayd: initialize the global fd tracker from fd_cap parameter
[lttng-tools.git] / src / bin / lttng-relayd / lttng-relayd.h
1 #ifndef LTTNG_RELAYD_H
2 #define LTTNG_RELAYD_H
3
4 /*
5 * Copyright (C) 2012 - Julien Desfossez <jdesfossez@efficios.com>
6 * David Goulet <dgoulet@efficios.com>
7 * 2015 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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
23 #include <limits.h>
24 #include <urcu.h>
25 #include <urcu/wfcqueue.h>
26
27 #include <common/hashtable/hashtable.h>
28 #include <common/fd-tracker/fd-tracker.h>
29
30 /*
31 * Queue used to enqueue relay requests
32 */
33 struct relay_conn_queue {
34 struct cds_wfcq_head head;
35 struct cds_wfcq_tail tail;
36 int32_t futex;
37 };
38
39 /*
40 * Contains stream indexed by ID. This is important since many commands lookup
41 * streams only by ID thus also keeping them in this hash table makes the
42 * search O(1).
43 */
44 extern struct lttng_ht *sessions_ht;
45 extern struct lttng_ht *relay_streams_ht;
46 extern struct lttng_ht *viewer_streams_ht;
47
48 extern char *opt_output_path;
49 extern const char *tracing_group_name;
50 extern const char * const config_section_name;
51 extern int opt_group_output_by_session;
52 extern int opt_group_output_by_host;
53
54 extern int thread_quit_pipe[2];
55
56 extern struct fd_tracker *the_fd_tracker;
57
58 void lttng_relay_notify_ready(void);
59 int lttng_relay_stop_threads(void);
60
61 #endif /* LTTNG_RELAYD_H */
This page took 0.031686 seconds and 5 git commands to generate.