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

From: Dan Kegel <dank@email-addr-hidden>
Date: Sat Jul 09 2011 - 00:52:23 EEST

On Fri, Jul 8, 2011 at 8:49 PM, Paul Davis <paul@email-addr-hidden> wrote:
> could be true enough, but i will be happy to fake ignorance and say i
> don't know for sure. but ...

I sure as heck don't know for sure :-)

> the whole point single reader/single writer lock-free FIFOs is that
> *synchronization doesn't matter*.

At least on x86, where Intel was very careful to preserve the illusion
of coherence, it works... usually?

http://en.wikipedia.org/wiki/Non-blocking_algorithm seems to agree with you,
but http://www.rossbencina.com/code/lockfree seems to agree with you
only on a uniprocessor system.

http://www.codeproject.com/KB/threads/LockFree.aspx has lots of interesting
links. In particular, it links to a couple articles by Herb Sutter,

http://drdobbs.com/cpp/210600279
http://drdobbs.com/high-performance-computing/211601363

He makes it sound like it's only possible using compare-and-swap
atomic primitives.
- Dan
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sat Jul 9 04:15:01 2011

This archive was generated by hypermail 2.1.8 : Sat Jul 09 2011 - 04:15:01 EEST