ringbuffer: add documentation