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.