[LAU] Simple, easy multithreaded circular buffer library for Linux?

Kjetil S. Matheussen k.s.matheussen at notam02.no
Fri Oct 17 08:25:58 EDT 2008



On Fri, 17 Oct 2008, Olivier Guilyardi wrote:

> Olivier Guilyardi wrote:
>> Paul Davis wrote:
>>> On Wed, 2008-10-15 at 13:02 +0200, Olivier Guilyardi wrote:
>>>> I'm no memory barrier expert, but from what I read this looks like a complex
>>>> topic. Adding them to jack's ring buffer may be hazardous without carefully
>>>> crafted test cases. Bugs related to missing barriers may or may not happen
>>>> according to various hardware-related issues.
>>> the point of memory barriers is really to remove the need for test
>>> cases :)
>>
>> I meant Test First, not putting a memory barrier between us and past bugs ;)
>>
>> My concern is: people around say memory barriers are missing, but could anyone
>> write a unit test that actually turns this assumption into a bug?
>
> Okay, I wrote such a test. It fails with Jack's ringbuffer (jack1 r3004) but
> succeeds with Portaudio's one (r1240).
>

I might be wrong (not unusual), but your code looks correct to me.
Good work!




More information about the Linux-audio-user mailing list