functions provide a lock-less multi-producer and lock-less multi-consumer as
well as single-consumer ring buffer.
function is used to allocate a buf_ring ring buffer with
slots using malloc_type
and memory flags
The single consumer interface is protected by
function is used to free a buf_ring.
The user is responsible for freeing any enqueued items.
function is used to enqueue a buffer to a buf_ring.
function is a multi-consumer safe way of dequeueing elements from a buf_ring.
function is a single-consumer interface to dequeue elements - requiring
the user to serialize accesses with a lock.
function returns the number of elements in a buf_ring.
if the buf_ring is empty,
if no more items can be enqueued,
function returns a pointer to the last element in the buf_ring if the
buf_ring is not empty,