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>
6 * SPDX-License-Identifier: GPL-2.0-only
10 #include "lttng-sessiond.h"
11 #include <common/uuid.h>
13 lttng_uuid sessiond_uuid
;
15 int ust_consumerd64_fd
= -1;
16 int ust_consumerd32_fd
= -1;
20 struct health_app
*health_sessiond
;
22 struct notification_thread_handle
*notification_thread_handle
;
24 struct lttng_ht
*agent_apps_ht_by_sock
= NULL
;
26 struct lttng_kernel_tracer_version kernel_tracer_version
;
27 struct lttng_kernel_tracer_abi_version kernel_tracer_abi_version
;
29 int kernel_poll_pipe
[2] = { -1, -1 };
34 struct sessiond_config config
;
36 struct consumer_data kconsumer_data
= {
37 .type
= LTTNG_CONSUMER_KERNEL
,
40 .channel_monitor_pipe
= -1,
41 .pid_mutex
= PTHREAD_MUTEX_INITIALIZER
,
42 .lock
= PTHREAD_MUTEX_INITIALIZER
,
45 struct consumer_data ustconsumer64_data
= {
46 .type
= LTTNG_CONSUMER64_UST
,
49 .channel_monitor_pipe
= -1,
50 .pid_mutex
= PTHREAD_MUTEX_INITIALIZER
,
51 .lock
= PTHREAD_MUTEX_INITIALIZER
,
54 struct consumer_data ustconsumer32_data
= {
55 .type
= LTTNG_CONSUMER32_UST
,
58 .channel_monitor_pipe
= -1,
59 .pid_mutex
= PTHREAD_MUTEX_INITIALIZER
,
60 .lock
= PTHREAD_MUTEX_INITIALIZER
,
63 enum consumerd_state ust_consumerd_state
;
64 enum consumerd_state kernel_consumerd_state
;
66 static void __attribute__((constructor
)) init_sessiond_uuid(void)
68 if (lttng_uuid_generate(sessiond_uuid
)) {
69 ERR("Failed to generate a session daemon UUID");