>> > 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 _______________________________________________ Linux-audio-dev mailing list Linux-audio-dev@lists.linuxaudio.org http://lists.linuxaudio.org/listinfo/linux-audio-dev