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

From: Paul Coccoli <pcoccoli@email-addr-hidden>
Date: Sun Oct 19 2008 - 06:45:59 EEST

On Sat, Oct 18, 2008 at 11:29 PM, Jack O'Quin <jack.oquin@email-addr-hidden> 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.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Sun Oct 19 08:15:02 2008

This archive was generated by hypermail 2.1.8 : Sun Oct 19 2008 - 08:15:02 EEST