X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Fctf-trace.c;h=f2af1a3d0fb17229e2939e5e294deeae3ecc443b;hb=87250ba19aec78f36e301494a03f5678fcb6fbb4;hp=fdd0a5d0d9d6d52c9075df7deb5867cf03d50c1b;hpb=348a81dcf7b6944b10a813d93dcaf86fdb5194f6;p=lttng-tools.git diff --git a/src/bin/lttng-relayd/ctf-trace.c b/src/bin/lttng-relayd/ctf-trace.c index fdd0a5d0d..f2af1a3d0 100644 --- a/src/bin/lttng-relayd/ctf-trace.c +++ b/src/bin/lttng-relayd/ctf-trace.c @@ -1,24 +1,13 @@ /* - * Copyright (C) 2013 - Julien Desfossez - * David Goulet - * 2015 - Mathieu Desnoyers + * Copyright (C) 2013 Julien Desfossez + * Copyright (C) 2013 David Goulet + * Copyright (C) 2015 Mathieu Desnoyers * - * 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. */ #define _LGPL_SOURCE -#include #include #include @@ -44,14 +33,14 @@ static void rcu_destroy_ctf_trace(struct rcu_head *rcu_head) * * MUST be called with the RCU read side lock. */ -void ctf_trace_destroy(struct ctf_trace *trace) +static void ctf_trace_destroy(struct ctf_trace *trace) { /* * Getting to this point, every stream referenced by that trace * have put back their ref since the've been closed by the * control side. */ - assert(cds_list_empty(&trace->stream_list)); + LTTNG_ASSERT(cds_list_empty(&trace->stream_list)); session_put(trace->session); trace->session = NULL; free(trace->path); @@ -59,7 +48,7 @@ void ctf_trace_destroy(struct ctf_trace *trace) call_rcu(&trace->rcu_node, rcu_destroy_ctf_trace); } -void ctf_trace_release(struct urcu_ref *ref) +static void ctf_trace_release(struct urcu_ref *ref) { struct ctf_trace *trace = caa_container_of(ref, struct ctf_trace, ref); @@ -68,7 +57,7 @@ void ctf_trace_release(struct urcu_ref *ref) iter.iter.node = &trace->node.node; ret = lttng_ht_del(trace->session->ctf_traces_ht, &iter); - assert(!ret); + LTTNG_ASSERT(!ret); ctf_trace_destroy(trace); }