On Fri, Oct 17, 2008 at 8:46 AM, Paul Davis wrote:
Why do you suspect you need memory barriers? My concern with
ringbuffer.c is the non-atomic ops on the read and write pointers.
They're marked volatile, but what I think you really want is make all
ops on those fields atomic. Stuff like this:
rb->read_ptr += n1;
rb->read_ptr &= rb->size_mask;
Looks like a problem to me. What happens if there's a context switch
in between those 2 statements?
NB: I only took a cursory glance at the code.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@lists.linuxaudio.org
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.