generic circular buffer implementation in C
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
circbuf/circbuf
Ondřej Hruška 338a22cf62 improved circbuf 1 year ago
..
README.md improved circbuf 1 year ago
circbuf.c improved circbuf 1 year ago
circbuf.h improved circbuf 1 year ago

README.md

Circular buffer

This is a C implementation of a circular buffer, which can also be used as a queue or stack.

To achieve thread safety (to some extent) in a producent-consumer situation, there is no length variable, only write pointers. Due to not using a length variable, one element in the buffer is always left unused.