85c1eec9035be74bb0b239b782a760dd27ad580f
[lttng-tools.git] / src / bin / lttng-sessiond / globals.c
1 /*
2 * Copyright (C) 2011 David Goulet <david.goulet@polymtl.ca>
3 * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
4 * Copyright (C) 2013 Jérémie Galarneau <jeremie.galarneau@efficios.com>
5 *
6 * SPDX-License-Identifier: GPL-2.0-only
7 *
8 */
9
10 #include "lttng-sessiond.h"
11 #include <common/uuid.h>
12
13 lttng_uuid sessiond_uuid;
14
15 int ust_consumerd64_fd = -1;
16 int ust_consumerd32_fd = -1;
17
18 long page_size;
19
20 struct health_app *health_sessiond;
21
22 struct notification_thread_handle *notification_thread_handle;
23
24 struct lttng_ht *agent_apps_ht_by_sock = NULL;
25 struct lttng_ht *trigger_agents_ht_by_domain = NULL;
26
27 struct lttng_kernel_tracer_version kernel_tracer_version;
28 struct lttng_kernel_tracer_abi_version kernel_tracer_abi_version;
29
30 int kernel_poll_pipe[2] = { -1, -1 };
31
32 pid_t ppid;
33 pid_t child_ppid;
34
35 struct sessiond_config config;
36
37 struct consumer_data kconsumer_data = {
38 .type = LTTNG_CONSUMER_KERNEL,
39 .err_sock = -1,
40 .cmd_sock = -1,
41 .channel_monitor_pipe = -1,
42 .pid_mutex = PTHREAD_MUTEX_INITIALIZER,
43 .lock = PTHREAD_MUTEX_INITIALIZER,
44 };
45
46 struct consumer_data ustconsumer64_data = {
47 .type = LTTNG_CONSUMER64_UST,
48 .err_sock = -1,
49 .cmd_sock = -1,
50 .channel_monitor_pipe = -1,
51 .pid_mutex = PTHREAD_MUTEX_INITIALIZER,
52 .lock = PTHREAD_MUTEX_INITIALIZER,
53 };
54
55 struct consumer_data ustconsumer32_data = {
56 .type = LTTNG_CONSUMER32_UST,
57 .err_sock = -1,
58 .cmd_sock = -1,
59 .channel_monitor_pipe = -1,
60 .pid_mutex = PTHREAD_MUTEX_INITIALIZER,
61 .lock = PTHREAD_MUTEX_INITIALIZER,
62 };
63
64 enum consumerd_state ust_consumerd_state;
65 enum consumerd_state kernel_consumerd_state;
66
67 static void __attribute__((constructor)) init_sessiond_uuid(void)
68 {
69 if (lttng_uuid_generate(sessiond_uuid)) {
70 ERR("Failed to generate a session daemon UUID");
71 abort();
72 }
73 }
This page took 0.031598 seconds and 3 git commands to generate.