/*
- * 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
* 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 <aland@freeradius.org>
+ * @brief Thread-safe queues.
+ * @file util/atomic_queue.c
+ *
+ * @copyright 2016 Alan DeKok <aland@freeradius.org>
+ * @copyright 2016 Alister Winfield
*/
RCSID("$Id$")
}
aq->size = size;
-
+
/*
* Set the head / tail indexes, and force other CPUs to
* see the writes.
fr_atomic_queue_entry_t *entry;
entry = &aq->entry[i];
-
+
fprintf(fp, "\t[%d] = { %p, %zd }\n",
i, entry->data, load(entry->seq));
}
/*
- * 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
* 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 <aland@freeradius.org>
+ * @copyright 2016 Alan DeKok <aland@freeradius.org>
*/
RCSID("$Id$")
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.
*p_request = fr_channel_recv_request(ch);
return -1;
}
-
+
rad_assert(end->num_outstanding > 0);
end->num_outstanding--;
/*
- * 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
* 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 <aland@freeradius.org>
+ * @copyright 2016 Alan DeKok <aland@freeradius.org>
*/
RCSID("$Id$")
* 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
uint8_t *p, *aligned_p;
intptr_t addr;
size_t aligned_size;
-
+
#ifndef NDEBUG
(void) talloc_get_type_abort(ms, fr_message_set_t);
/*
- * 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
* 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 <aland@freeradius.org>
+ * @copyright 2016 Alan DeKok <aland@freeradius.org>
*/
RCSID("$Id$")
/*
- * 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
* 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 <aland@freeradius.org>
+ * @copyright 2016 Alan DeKok <aland@freeradius.org>
*/
RCSID("$Id$")
/*
- * 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
* 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 <aland@freeradius.org>
+ * @copyright 2016 Alan DeKok <aland@freeradius.org>
*/
RCSID("$Id$")
/*
- * 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
* 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 <aland@freeradius.org>
+ * @copyright 2016 Alan DeKok <aland@freeradius.org>
*/
RCSID("$Id$")
/*
- * 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
* 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 <aland@freeradius.org>
+ * @copyright 2016 Alan DeKok <aland@freeradius.org>
*/
RCSID("$Id$")