[LAD] a *simple* ring buffer, comments pls?

Tim Blechmann tim at klingt.org
Fri Jul 8 20:54:58 UTC 2011


>> > I thought a "lock-free" ring buffer was supposed to be
>> > the easy solution!
>> 
>> It is... when you re-use one that's already been written and
>> debugged.  ;-)
>> 
>> Why not copy/paste the JACK ringbuffer (C) or even Ardours
>> (C++ Container)?
> 
> Here's another C++ one, for the record:
> 
> http://svn.drobilla.net/lad/trunk/raul/raul/RingBuffer.hpp

the linux kernel and supercollider have their own implementations of this 
algorithm as well ... iirc it is also described in the book `the art of 
multiprocessor programming' by maurice herlihy and nir shavit.

and i would like to do some self-advertising: i have submitted some of my lock-
free data structures to boost, and they will be reviewed in the end of july 
(18th-27th). source and docs are online [1, 2] and i'd like to invite everybody 
with an interest in lock-free programming to take part in the review. all the 
provided data structures (wait-free spsc ringbuffer, lock-free mpmc fifo and 
lock-free mpmc lifo) are potentially interesting for audio applications and i 
heavily use them for my multiprocessor-aware supercollider server ...

the review itself will take place on the boost-dev mailinglist [3]

cheers, tim

[1] http://tim.klingt.org/boost_lockfree
[2] http://tim.klingt.org/git?p=boost_lockfree.git;a=summary
[3] http://www.boost.org/community/groups.html#main




More information about the Linux-audio-dev mailing list