Struct rawfifo

Struct Documentation

struct rawfifo

A raw FIFO that is fast, and has a limited API.

Can (and should) only be used with elements of 1, 2 or 4 bytes. This is to make all add/remove operations atomic at the instruction level via pointer arithmetic, so that it can be used in ISRs safely.

For general (read: non-ISR) FIFO things, fifo should be used instead.

Public Members

dptr_t *elements

The actual elements.

size_t to_i

Element where we write next.

size_t from_i

Element where we read next.

size_t max_elts

Max # of elts = fifo elts + 1.

size_t elt_size

Size of element in bytes.