18 Nov
2007
18 Nov
'07
6:31 p.m.
Hello,
Yes, this old chestnut. I've spent the best part of today trying to ascertain whether or not, in practical terms, a single-producer, single-consumer lock free ring-buffer can be written purely in C/C++ and be SMP safe on multiple architectures without memory barriers. Information I've found has been largely conflicting so I've given up trying to get a conclusive answer. Instead I'll just go with the flow.
What is the general consensus amongst ALSA application developers when it comes to implementing this kind of buffer? Is it possible to use memory barriers through some user space API call that I don't know about?
Thanks in advance for any comments/suggestions. Matt.