|
ring_buf
|
Ring buffer zone. More...
#include <ring_buf.h>
Data Fields | |
| ring_buf_ptrdiff_t | base |
| Base index of the zone. | |
| ring_buf_ptrdiff_t | head |
| Head index of the zone. | |
| ring_buf_ptrdiff_t | tail |
| Tail index of the zone. | |
Ring buffer zone.
A ring buffer contains two zones: one for putting data and one for getting data. Each zone has a base, head, and tail pointer. Pointer here refers to a signed zero-based index (ring_buf_ptrdiff_t) relative to the buffer's start. The base pointer marks the beginning of the zone, while the head pointer marks the end of the zone. The tail pointer is used to track the position of the oldest data in the zone.
Definition at line 93 of file ring_buf.h.
| ring_buf_ptrdiff_t ring_buf_zone::base |
Base index of the zone.
Marks the starting point of the zone within the ring buffer.
Definition at line 98 of file ring_buf.h.
| ring_buf_ptrdiff_t ring_buf_zone::head |
Head index of the zone.
Marks the end point of the zone within the ring buffer.
Definition at line 104 of file ring_buf.h.
| ring_buf_ptrdiff_t ring_buf_zone::tail |
Tail index of the zone.
Marks the position of the oldest data in the zone.
Definition at line 110 of file ring_buf.h.