[vlc-devel] Re: vlc: svn commit r19076 (sigmunau)
rem at videolan.org
Thu Mar 1 18:55:41 CET 2007
Le jeudi 1 mars 2007 19:42, Christophe Massiot a écrit :
> This is not entirely true - if you look closely at the source,
> Sigmund's version has an extra condition before calling
> clock_nanosleep :
Thanks for explaining my own code to me :)
The point is, it is (at least theoretically) incorrect to wait for a
period of time, since it could be that the threads gets yield *between*
mdate() and mwait(), in which case the delay value will be too big.
> However, commenting out the if() doesn't reintroduce the problem,
Maybe it does not, but I surely wouldn't risk waiting for a negative
amount of time, while it is theoretically safe to wait for a past date.
But of course, if mdate() needs to be called, this is a non-issue.
> I am not as familiar as you with the clock_nanosleep behaviour, but I
> can only suspect a kernel or libc bug at this point.
At some point in the past, my delay division was buggy. But that seems
fine now. Still, I have not been able to build any testcase showing a
problem in libc/kernel.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the vlc-devel