X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmanage-consumer.c;h=719d42b18b364e43478c3cc1a1d0b1ea9c031348;hb=a0377dfefe40662ba7d68617bce6ff467114136c;hp=9f3eca3244c52ad2ad9f5ddc884fedaa9e5ef36f;hpb=0e0b3d3a4c1ab1c46f0d6878042344b13ac63eee;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/manage-consumer.c b/src/bin/lttng-sessiond/manage-consumer.c index 9f3eca324..719d42b18 100644 --- a/src/bin/lttng-sessiond/manage-consumer.c +++ b/src/bin/lttng-sessiond/manage-consumer.c @@ -1,20 +1,10 @@ /* - * 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 @@ -32,7 +22,7 @@ struct thread_notifiers { struct lttng_pipe *quit_pipe; struct consumer_data *consumer_data; - sem_t ready; + sem_t ready; int initialization_result; }; @@ -46,7 +36,7 @@ static void mark_thread_as_ready(struct thread_notifiers *notifiers) static void mark_thread_intialization_as_failed( struct thread_notifiers *notifiers) { - ERR("Consumer management thread entering error state"); + ERR("Consumer management thread entering error state"); notifiers->initialization_result = -1; sem_post(¬ifiers->ready); } @@ -77,7 +67,7 @@ static void *thread_consumer_management(void *data) rcu_register_thread(); rcu_thread_online(); - health_register(health_sessiond, HEALTH_SESSIOND_TYPE_CONSUMER); + health_register(the_health_sessiond, HEALTH_SESSIOND_TYPE_CONSUMER); health_code_update(); @@ -253,7 +243,7 @@ static void *thread_consumer_management(void *data) cmd_socket_wrapper->lock = &consumer_data->lock; pthread_mutex_lock(cmd_socket_wrapper->lock); - ret = consumer_init(cmd_socket_wrapper, sessiond_uuid); + ret = consumer_init(cmd_socket_wrapper, the_sessiond_uuid); if (ret) { ERR("Failed to send sessiond uuid to consumer daemon"); mark_thread_intialization_as_failed(notifiers); @@ -360,13 +350,13 @@ error: /* Immediately set the consumerd state to stopped */ if (consumer_data->type == LTTNG_CONSUMER_KERNEL) { - uatomic_set(&kernel_consumerd_state, CONSUMER_ERROR); + uatomic_set(&the_kernel_consumerd_state, CONSUMER_ERROR); } else if (consumer_data->type == LTTNG_CONSUMER64_UST || consumer_data->type == LTTNG_CONSUMER32_UST) { - uatomic_set(&ust_consumerd_state, CONSUMER_ERROR); + uatomic_set(&the_ust_consumerd_state, CONSUMER_ERROR); } else { /* Code flow error... */ - assert(0); + abort(); } if (consumer_data->err_sock >= 0) { @@ -416,7 +406,7 @@ error_poll: health_error(); ERR("Health error occurred in %s", __func__); } - health_unregister(health_sessiond); + health_unregister(the_health_sessiond); DBG("consumer thread cleanup completed"); rcu_thread_offline();