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

Paul Coccoli pcoccoli at gmail.com
Sun Oct 19 03:45:59 UTC 2008


On Sat, Oct 18, 2008 at 11:29 PM, Jack O'Quin <jack.oquin at gmail.com> wrote:
> This is wrong.  For the single reader, single writer case, atomic operations
> are *not* necessary.  The bug, as was already pointed out, is due to storing

Let's agree to disagree, then.  Single-reader, single-writer does not
automatically make something SMP safe.  There is large body of
literature on lock-free data structures that agrees with me; someone
posted a link to a collection of those earlier in the thread.

> the unmasked pointer in the ringbuffer, allowing the other thread to see it
> in an invalid state.

Paul Davis disagrees, and I have yet to come up with a scenario where
read_ptr can be assigned a value larger than size.  And I'm the one
who pointed out the bug in the first place.



More information about the Linux-audio-dev mailing list