18#define U_MAX_FIFO_INDICES 16
22 uint32_t indices[U_MAX_FIFO_INDICES];
30 if (uif->start == uif->end) {
39 if (((uif->end + 1) % U_MAX_FIFO_INDICES) == uif->start) {
46u_index_fifo_peek(
struct u_index_fifo *uif, uint32_t *out_index)
48 if (u_index_fifo_is_empty(uif)) {
52 *out_index = uif->indices[uif->start];
57u_index_fifo_pop(
struct u_index_fifo *uif, uint32_t *out_index)
59 if (u_index_fifo_is_empty(uif)) {
63 *out_index = uif->indices[uif->start];
64 uif->start = (uif->start + 1) % U_MAX_FIFO_INDICES;
69u_index_fifo_push(
struct u_index_fifo *uif, uint32_t index)
71 if (u_index_fifo_is_full(uif)) {
75 uif->indices[uif->end] = index;
76 uif->end = (uif->end + 1) % U_MAX_FIFO_INDICES;
Definition: u_index_fifo.h:21
Header holding common defines.