Fix: ust: segfault on lttng start on filter bytecode copy
[lttng-tools.git] / src / bin / lttng-sessiond / globals.c
CommitLineData
a7333da7 1/*
ab5be9fa
MJ
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>
a7333da7 5 *
ab5be9fa 6 * SPDX-License-Identifier: GPL-2.0-only
a7333da7 7 *
a7333da7
JG
8 */
9
10#include "lttng-sessiond.h"
c70636a7 11#include <common/uuid.h>
52a0e931 12
412d7227 13lttng_uuid the_sessiond_uuid;
a7333da7 14
412d7227
SM
15int the_ust_consumerd64_fd = -1;
16int the_ust_consumerd32_fd = -1;
a7333da7 17
412d7227 18long the_page_size;
a7333da7 19
412d7227 20struct health_app *the_health_sessiond;
a7333da7 21
412d7227 22struct notification_thread_handle *the_notification_thread_handle;
a7333da7 23
412d7227
SM
24struct lttng_ht *the_agent_apps_ht_by_sock = NULL;
25struct lttng_ht *the_trigger_agents_ht_by_domain = NULL;
a7333da7 26
b8e2fb80
FD
27struct lttng_kernel_abi_tracer_version the_kernel_tracer_version;
28struct lttng_kernel_abi_tracer_abi_version the_kernel_tracer_abi_version;
a7333da7 29
412d7227 30int the_kernel_poll_pipe[2] = {-1, -1};
a7333da7 31
412d7227
SM
32pid_t the_ppid;
33pid_t the_child_ppid;
a7333da7 34
412d7227 35struct sessiond_config the_config;
917a718d 36
412d7227 37struct consumer_data the_kconsumer_data = {
917a718d
JG
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,
917a718d
JG
44};
45
412d7227 46struct consumer_data the_ustconsumer64_data = {
917a718d
JG
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,
917a718d
JG
53};
54
412d7227 55struct consumer_data the_ustconsumer32_data = {
917a718d
JG
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,
917a718d
JG
62};
63
412d7227
SM
64enum consumerd_state the_ust_consumerd_state;
65enum consumerd_state the_kernel_consumerd_state;
52a0e931
JG
66
67static void __attribute__((constructor)) init_sessiond_uuid(void)
68{
412d7227 69 if (lttng_uuid_generate(the_sessiond_uuid)) {
52a0e931
JG
70 ERR("Failed to generate a session daemon UUID");
71 abort();
72 }
73}
This page took 0.0396 seconds and 4 git commands to generate.