Function rc_ringbuf_empty#
Defined in File ring_buffer.h
Function Documentation#
-
rc_ringbuf_t rc_ringbuf_empty(void)#
Returns an rc_ringbuf_t struct which is completely zero’d out with no memory allocated for it.
This is essential for declaring new ring buffers since structs declared inside of functions are not necessarily zero’d out which can cause the struct to contain problematic contents leading to segfaults. New ring buffers should be initialized with this before calling rc_ringbuf_alloc.
- Returns:
empty and ready-to-allocate rc_ringbuf_t