
26 Nov
2008
26 Nov
'08
12:11 p.m.
Where is the magic? Can you point to some documentation or how to use it?
It seems to make the assumption that volatile variable reads and writes are atomic. This, among with careful organization of those operations, allows safe concurrent access. C++03 does not define any atomic operations, but in practice these seem to be atomic on all implementations with int-sized and smaller variables. Documentation for the JACK ring buffer (also links to the header code): http://jackaudio.org/files/docs/html/ringbuffer_8h.html