With version 0.2.1 it is possible to speed up the ringBufU instance access by using a compilation with special definitions set (RINGBUFU_FASTACC_NO>0).
Hence older versions could be used with faster ringBufU API functions yet; but also with less savety.
Also it should be tested more thouroughly. Hence i changed it to beta; hope you could find it too.
.. including a simple-stress test with many threads (many putter's, one getter).
Also a tutor file with 2 introducing examples is included and descrption of ringBufU functions is enhanced.
Pls. let me know if you have issues in using or missing features. Thx.
This 1st version should give an overview of the possibilities; not all features yet integrated (see NYI remark in source).
With simpletest#1 (stest01) some base tests and an short interactive character-Ring-Buffer test is given.
With simpletest#2 (stest02) U could compare different Buffer-methods in C and C++, including ringBufU usage. Showing the put&get times, but beware: this is only a rough information due to the fact that operating systems are not strong real-time systems.
"ringBufU" is for different types of buffer-elements and some features are now not fulfilled.
The Control-data (CB/ControlBlock) and Buffer-Data are in main separated; but in this version it is only one memory allocation which contains both for one buffer instance.
The public-control-struct ptr (see ringbufu.h) will usually be used for any access to the ring-buffer instance via functions.
In default-case and in linux/MACOSX a posix mutex will protect access to the buffers in a multithread environment.