Re: Simple, easy multithreaded circular buffer library for Linux?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fons Adriaensen wrote:
> 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.

ah, of course. one reader, one writer only. sorry for the noise.


-- 
jörn nettingsmeier

home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621

Kurt is up in Heaven now.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user


[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux