From: Arran Cudbard-Bell Date: Fri, 25 Nov 2016 22:40:25 +0000 (-0500) Subject: Use doxygen headers for src/util files X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3cee44208dc56ab0da4600c232f80f395ce486e;p=thirdparty%2Ffreeradius-server.git Use doxygen headers for src/util files Add a copyright attribution for Alister Winfield to src/util/atomic_queue.c as he wrote the original implementation of the atomic_queue algorithm that was adapted for use with FreeRADIUS. --- diff --git a/src/util/atomic_queue.c b/src/util/atomic_queue.c index f3f9a4a2f16..b01218b1c36 100644 --- a/src/util/atomic_queue.c +++ b/src/util/atomic_queue.c @@ -1,8 +1,4 @@ /* - * atomic_queue.c Thread-safe queues. - * - * Version: $Id$ - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +12,16 @@ * 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 St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * $Id$ * - * Copyright 2016 Alan DeKok + * @brief Thread-safe queues. + * @file util/atomic_queue.c + * + * @copyright 2016 Alan DeKok + * @copyright 2016 Alister Winfield */ RCSID("$Id$") @@ -99,7 +103,7 @@ fr_atomic_queue_t *fr_atomic_queue_create(TALLOC_CTX *ctx, int size) } aq->size = size; - + /* * Set the head / tail indexes, and force other CPUs to * see the writes. @@ -257,7 +261,7 @@ void fr_atomic_queue_debug(fr_atomic_queue_t *aq, FILE *fp) fr_atomic_queue_entry_t *entry; entry = &aq->entry[i]; - + fprintf(fp, "\t[%d] = { %p, %zd }\n", i, entry->data, load(entry->seq)); } diff --git a/src/util/channel.c b/src/util/channel.c index 5a136c5cc82..df0415c2ad9 100644 --- a/src/util/channel.c +++ b/src/util/channel.c @@ -1,8 +1,4 @@ /* - * channel.c Two-way thread-safe channels - * - * Version: $Id$ - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +12,15 @@ * 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 St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * $Id$ + * + * @brief Two-way thread-safe channels + * @file util/channel.c * - * Copyright 2016 Alan DeKok + * @copyright 2016 Alan DeKok */ RCSID("$Id$") @@ -203,7 +206,7 @@ int fr_channel_send_request(fr_channel_t *ch, fr_channel_data_t *cd, fr_channel_ rad_assert(end->last_write <= when); end->last_write = when; - + /* * Increment the number of outstanding packets. If we * just sent a new one, wake up the other end. @@ -343,7 +346,7 @@ int fr_channel_send_reply(fr_channel_t *ch, fr_channel_data_t *cd, fr_channel_da *p_request = fr_channel_recv_request(ch); return -1; } - + rad_assert(end->num_outstanding > 0); end->num_outstanding--; diff --git a/src/util/message.c b/src/util/message.c index 3905e499bf0..6d2025fe19f 100644 --- a/src/util/message.c +++ b/src/util/message.c @@ -1,8 +1,4 @@ /* - * message.c Messages for inter-thread communication. - * - * Version: $Id$ - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +12,15 @@ * 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 St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * $Id$ + * + * @brief Messages for inter-thread communication + * @file util/message.c * - * Copyright 2016 Alan DeKok + * @copyright 2016 Alan DeKok */ RCSID("$Id$") @@ -666,7 +669,7 @@ static void fr_message_gc(fr_message_set_t *ms, int max_to_clean) * The newly allocated message is zeroed. * * @param[in] ms the message set - * @param[in] mr the message ring to allocate from + * @param[in] mr the message ring to allocate from * @param[in] clean whether to clean the message ring * @return * - NULL on failed allocation @@ -1304,7 +1307,7 @@ fr_message_t *fr_message_alloc_aligned(fr_message_set_t *ms, fr_message_t *m, si uint8_t *p, *aligned_p; intptr_t addr; size_t aligned_size; - + #ifndef NDEBUG (void) talloc_get_type_abort(ms, fr_message_set_t); diff --git a/src/util/queue.c b/src/util/queue.c index 74daa9073a0..c7e7c8b9760 100644 --- a/src/util/queue.c +++ b/src/util/queue.c @@ -1,8 +1,4 @@ /* - * queue.c Thread-unsafe queues. - * - * Version: $Id$ - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +12,15 @@ * 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 St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * $Id$ + * + * @brief Thread-unsafe queues + * @file util/queue.c * - * Copyright 2016 Alan DeKok + * @copyright 2016 Alan DeKok */ RCSID("$Id$") diff --git a/src/util/ring_buffer.c b/src/util/ring_buffer.c index db0ebf70822..0e30cf49d84 100644 --- a/src/util/ring_buffer.c +++ b/src/util/ring_buffer.c @@ -1,8 +1,4 @@ /* - * ring_buffer.c Simple ring buffers for packet contents. - * - * Version: $Id$ - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +12,15 @@ * 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 St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * $Id$ + * + * @brief Simple ring buffers for packet contents + * @file util/ring_buffer.c * - * Copyright 2016 Alan DeKok + * @copyright 2016 Alan DeKok */ RCSID("$Id$") diff --git a/src/util/time.c b/src/util/time.c index 24346521b94..289dd6262b9 100644 --- a/src/util/time.c +++ b/src/util/time.c @@ -1,8 +1,4 @@ /* - * time.c Platform independent time functions - * - * Version: $Id$ - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +12,15 @@ * 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 St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * $Id$ + * + * @brief Platform independent time functions + * @file util/time.c * - * Copyright 2016 Alan DeKok + * @copyright 2016 Alan DeKok */ RCSID("$Id$") diff --git a/src/util/track.c b/src/util/track.c index b5e403b5375..b13c0ccf0cd 100644 --- a/src/util/track.c +++ b/src/util/track.c @@ -1,8 +1,4 @@ /* - * track.c RADIUS packet tracking - * - * Version: $Id$ - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +12,15 @@ * 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 St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * $Id$ + * + * @brief RADIUS packet tracking + * @file util/track.c * - * Copyright 2016 Alan DeKok + * @copyright 2016 Alan DeKok */ RCSID("$Id$") diff --git a/src/util/worker.c b/src/util/worker.c index 54da6f3ee8e..641cb2effc0 100644 --- a/src/util/worker.c +++ b/src/util/worker.c @@ -1,8 +1,4 @@ /* - * worker.c Worker thread functiobns. - * - * Version: $Id$ - * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +12,15 @@ * 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 St, Fifth Floor, Boston, MA 02110-1301, USA + */ + + /** + * $Id$ + * + * @brief Worker thread functions. + * @file util/worker.c * - * Copyright 2016 Alan DeKok + * @copyright 2016 Alan DeKok */ RCSID("$Id$")