Mailing List archive

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

[vdr] Re: Video Disk Recorder version 1.0.1



On Sun, Apr 21, 2002 at 08:19:42PM +0200, Andreas Schultz wrote:
> Hi Klaus,
> 
> On Sunday 21 April 2002 16:59, Klaus Schmidinger wrote:
> > The new version 1.0.1 of the Video Disk Recorder project
> 
> > - Improved thread locking in the ring buffer to avoid possible race
> > conditions under heavy load (thanks to Werner Fink).
> 
> Could you or Werner Fink explain what excatly those changes are supposed to 
> fix?
> I was going over that code before and IMHO is there no race, with a slight 
> change could the code even work completly without locking. There exists only 
> a race between clear and get/put, but that is taken care of by cPlayBuffer.

IMHO the variables head and tail shouldn't be changed without hold
Lock during the changes (ringbuffer.c cRingBufferLinear::Get() and
cRingBufferLinear::Put()).  This may fix the problem seen by some
people (including me) with broken records from Pro7 mainly with AC3 5.1.
Nevertheless even this isn't the reason it doesn't hurt.


      Werner



Home | Main Index | Thread Index