In standard C there is no functionallity for ringbuffer data
structures. Ringbuffers are a special form of arrays which offer
a 'pipe'-like interface: data can be put into the ringbuffer
at the end and get from the ringbuffer from the beginning.
This small C library offer an efficient ringbuffer
implementation for any data type which avoid expensive movement
of the data content.
• functions to create, delete, put/get data, move data
• direct access of ringbuffer data for special purposes
Sorry, there is no makefile, but compilation is simple:
gcc -c ringbuffers.c -DHAVE_LONG_LONG
gcc -c lists.c
gcc -c global.c
gcc -c ringbuffers_demo.c
gcc -o ringbuffers_demo ringbuffers_demo.o ringbuffers.o lists.o global.o -lpthread
• If no long long type is available, long long format
cannot be done. Usually long long is checked in a configure script.
• Lists library is required for debug functions in ringbuffers
and included here, too.
Ringbuffer library is currently under GPL version 2.
* initial public release
Back to top