MMgr v1.0.0
Zero-heap memory manager in C11. One borrowed buffer, carved by asserted offset.
Loading...
Searching...
No Matches
PingPong Struct Reference

A pair of buffers, one being filled while the other is drained. More...

#include <confinium_externum.h>

Data Fields

uint8_t fill_idx
uint8_t fill_index

Detailed Description

A pair of buffers, one being filled while the other is drained.

Note
fill_idx is the only member; the buffers it indexes are stored elsewhere.
fill_index is the only member. The buffers it indexes are stored elsewhere.
The two roles are one bit. The drain index is this one's complement. A swap is a flip and there is no second member to keep in step.
Warning
What holds fill_index to 0 or 1 is mmgr_pingpong_init setting it and mmgr_pingpong_swap flipping it. A pair that has not been through mmgr_pingpong_init carries whatever its storage contained, and no call here tests the value.

Definition at line 32 of file confinium_externum.h.

Field Documentation

◆ fill_idx

uint8_t PingPong::fill_idx

Index of the buffer being filled, 0 or 1.

Definition at line 34 of file confinium_externum.h.

◆ fill_index

uint8_t PingPong::fill_index

Index of the buffer being filled, 0 or 1.

Definition at line 46 of file memoria_externa.h.


The documentation for this struct was generated from the following files: