X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fglobals.c;h=8681d5d90749d84c5745015d52334f4c65a1bb18;hp=efe80baaf2fef86a76b8ec66366d67f997c08e0e;hb=2463b7879c00298daa79744cdaae82ac061a4ed8;hpb=4ec029ed8d032ac98d8dc158a751841b7c150639 diff --git a/src/bin/lttng-sessiond/globals.c b/src/bin/lttng-sessiond/globals.c index efe80baaf..8681d5d90 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; @@ -27,10 +20,11 @@ long page_size; struct health_app *health_sessiond; struct notification_thread_handle *notification_thread_handle; +pthread_mutex_t notification_trigger_tokens_ht_lock = PTHREAD_MUTEX_INITIALIZER; 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; @@ -70,3 +64,11 @@ struct consumer_data ustconsumer32_data = { 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(); + } +}