|
|
@ -1,4 +1,3 @@
|
|
|
|
/* SPDX-License-Identifier: GPL-3.0-or-later */
|
|
|
|
|
|
|
|
/* See the end of this file for copyright, license, and warranty information. */
|
|
|
|
/* See the end of this file for copyright, license, and warranty information. */
|
|
|
|
|
|
|
|
|
|
|
|
/* Simple ring buffer implementation. */
|
|
|
|
/* Simple ring buffer implementation. */
|
|
|
@ -6,6 +5,7 @@
|
|
|
|
#include <ardix/malloc.h>
|
|
|
|
#include <ardix/malloc.h>
|
|
|
|
#include <ardix/ringbuf.h>
|
|
|
|
#include <ardix/ringbuf.h>
|
|
|
|
#include <ardix/types.h>
|
|
|
|
#include <ardix/types.h>
|
|
|
|
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
|
|
|
|
struct ringbuf *ringbuf_create(size_t size)
|
|
|
|
struct ringbuf *ringbuf_create(size_t size)
|
|
|
@ -61,16 +61,11 @@ size_t ringbuf_write(struct ringbuf *buf, const void *src, size_t len)
|
|
|
|
* This file is part of Ardix.
|
|
|
|
* This file is part of Ardix.
|
|
|
|
* Copyright (c) 2020, 2021 Felix Kopp <owo@fef.moe>.
|
|
|
|
* Copyright (c) 2020, 2021 Felix Kopp <owo@fef.moe>.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Ardix is free software: you can redistribute it and/or modify it
|
|
|
|
* Ardix is non-violent software: you may only use, redistribute,
|
|
|
|
* under the terms of the GNU General Public License as published by
|
|
|
|
* and/or modify it under the terms of the CNPLv6+ as found in
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* the LICENSE file in the source code root directory or at
|
|
|
|
* (at your option) any later version.
|
|
|
|
* <https://git.pixie.town/thufie/CNPL>.
|
|
|
|
*
|
|
|
|
|
|
|
|
* Ardix 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
|
|
|
|
* Ardix comes with ABSOLUTELY NO WARRANTY, to the extent
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
* permitted by applicable law. See the CNPLv6+ for details.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|