diff options
author | dzwdz | 2023-02-23 20:07:59 +0100 |
---|---|---|
committer | dzwdz | 2023-02-23 20:07:59 +0100 |
commit | fca80df9e638a7d68147d91cbffda95aed96ab5c (patch) | |
tree | 7f64c1bd425303e3a09baaf9975cfb476ddd527f /src/shared/container/ring.h | |
parent | 71ad3a8e7ace69f1c8dd732f5a223b93d8b5e946 (diff) |
build: don't -Isrc/ in user code
Diffstat (limited to 'src/shared/container/ring.h')
-rw-r--r-- | src/shared/container/ring.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/shared/container/ring.h b/src/shared/container/ring.h deleted file mode 100644 index dbaf331..0000000 --- a/src/shared/container/ring.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once -#include <stddef.h> -#include <stdint.h> - -typedef struct { - char *buf; - size_t capacity; - size_t _head, _tail; -} ring_t; - -/** Returns amount of bytes stored in the buffer. */ -size_t ring_used(ring_t*); -/** Returns amount of space left in the buffer. */ -size_t ring_avail(ring_t*); - -void ring_put(ring_t*, const void*, size_t); -void ring_put1b(ring_t*, uint8_t); - -size_t ring_get(ring_t*, void*, size_t); - -/** Consumes up to `len` bytes, and returns a pointer to the buffer where it's stored. - * Not thread-safe. */ -void* ring_contig(ring_t*, size_t *len); |