blob: 0cc254aa851627e65de63a1a4af6be5f7f386982 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef RINGBUFFER_INTERNAL_H
#define RINGBUFFER_INTERNAL_H
#include "ringbuffer.h"
struct rbuf {
char *data;
// points to next byte where we can write
char *head;
// points to oldest (next to be poped) readable byte
char *tail;
// to avoid calculating data + size
// all the time
char *end;
size_t size;
size_t size_data;
};
typedef struct rbuf *rbuf_t;
#endif
|