8 * Circular buffer with functions for accessing elements in order.
9 * One slot always remains unused to distinguish between the empty/full case.
12 typedef struct RingBuffer RingBuffer
;
14 RingBuffer
*ringbuf_alloc(size_t size
);
15 void ringbuf_free(RingBuffer
*);
16 void ringbuf_add(RingBuffer
*, const void *value
);
17 const void *ringbuf_prev(RingBuffer
*);
18 const void *ringbuf_next(RingBuffer
*);
19 void ringbuf_invalidate(RingBuffer
*);