On Fri, Oct 17, 2008 at 09:26:45PM +0200, Joern Nettingsmeier wrote:
> i see. but what about the other scenario:
> thread A reads read_ptr.
> thread B runs and increments it.
> thread A increases the old (wrong) read_ptr value by one and writes a
> wrong value.
>
> isn't that a problem here?
This can't happen. For both read_ptr and write_ptr
only *one* of the two sides will ever modify it.
That is really the basic idea behind all this.
The other side just reads it, and will never read
a value that could trigger an error.
side.
Ciao,
-- FA Laboratorio di Acustica ed Elettroacustica Parma, Italia Lascia la spina, cogli la rosa. _______________________________________________ Linux-audio-user mailing list Linux-audio-user@email-addr-hidden http://lists.linuxaudio.org/mailman/listinfo/linux-audio-userReceived on Sat Oct 18 00:15:05 2008
This archive was generated by hypermail 2.1.8 : Sat Oct 18 2008 - 00:15:05 EEST