X-Git-Url: http://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fglobals.c;h=85c1eec9035be74bb0b239b782a760dd27ad580f;hp=6ca5a5a712901328d53e078cc0391b42680168d4;hb=44760c20f4fc255b63894ca758cf2ee5f253220b;hpb=971a61c658e35f7e2a71040455a273320b409636 diff --git a/src/bin/lttng-sessiond/globals.c b/src/bin/lttng-sessiond/globals.c index 6ca5a5a71..85c1eec90 100644 --- a/src/bin/lttng-sessiond/globals.c +++ b/src/bin/lttng-sessiond/globals.c @@ -1,23 +1,16 @@ /* - * Copyright (C) 2011 - David Goulet - * Mathieu Desnoyers - * 2013 - Jérémie Galarneau + * Copyright (C) 2011 David Goulet + * Copyright (C) 2011 Mathieu Desnoyers + * Copyright (C) 2013 Jérémie Galarneau * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "lttng-sessiond.h" +#include + +lttng_uuid sessiond_uuid; int ust_consumerd64_fd = -1; int ust_consumerd32_fd = -1; @@ -29,8 +22,8 @@ struct health_app *health_sessiond; struct notification_thread_handle *notification_thread_handle; struct lttng_ht *agent_apps_ht_by_sock = NULL; +struct lttng_ht *trigger_agents_ht_by_domain = NULL; -int kernel_tracer_fd = -1; struct lttng_kernel_tracer_version kernel_tracer_version; struct lttng_kernel_tracer_abi_version kernel_tracer_abi_version; @@ -48,8 +41,6 @@ struct consumer_data kconsumer_data = { .channel_monitor_pipe = -1, .pid_mutex = PTHREAD_MUTEX_INITIALIZER, .lock = PTHREAD_MUTEX_INITIALIZER, - .cond = PTHREAD_COND_INITIALIZER, - .cond_mutex = PTHREAD_MUTEX_INITIALIZER, }; struct consumer_data ustconsumer64_data = { @@ -59,8 +50,6 @@ struct consumer_data ustconsumer64_data = { .channel_monitor_pipe = -1, .pid_mutex = PTHREAD_MUTEX_INITIALIZER, .lock = PTHREAD_MUTEX_INITIALIZER, - .cond = PTHREAD_COND_INITIALIZER, - .cond_mutex = PTHREAD_MUTEX_INITIALIZER, }; struct consumer_data ustconsumer32_data = { @@ -70,9 +59,15 @@ struct consumer_data ustconsumer32_data = { .channel_monitor_pipe = -1, .pid_mutex = PTHREAD_MUTEX_INITIALIZER, .lock = PTHREAD_MUTEX_INITIALIZER, - .cond = PTHREAD_COND_INITIALIZER, - .cond_mutex = PTHREAD_MUTEX_INITIALIZER, }; enum consumerd_state ust_consumerd_state; enum consumerd_state kernel_consumerd_state; + +static void __attribute__((constructor)) init_sessiond_uuid(void) +{ + if (lttng_uuid_generate(sessiond_uuid)) { + ERR("Failed to generate a session daemon UUID"); + abort(); + } +}