[vlc-devel] Re: vlc: svn commit r19076 (sigmunau)

Sigmund Augdal sigmund.augdal at gmail.com
Fri Mar 2 12:13:09 CET 2007


On Fri, 2007-03-02 at 11:40 +0100, Remi Denis-Courmont wrote:
> On Thu, 01 Mar 2007 11:01:42 +0100, Sigmund Augdal <sigmund.augdal at gmail.com> wrote:
> > I do have some concerns about the current code even if these does not
> > seem to bue the cause of my issues. You should only fall back to
> > CLOCK_REALTIME in case clock_nanosleep returns ENOTSUP, it may return
> > other values according to documentation.
> 
> ENOTSUP is returned for known unsupported clocks. EINVAL is returned for
> unknown clocks. The only other error is EINTR, which we should handle in
> a nicer way, but the old nanosleep() implementation has never done so,
> and neither did the archaic select(), and nobody has ever complained.
> 
> > This is particularly true for CLOCK_ABSTIME in which case it might end
> > up sleeping indefinitly on a false fallback.
> 
> Uh?
> 
> Even if that were to happen on Linux, monotonic clock = system uptime
> which is smaller than real (UTC computed from Epoch) time, or you have
> a REALLY impressive uptime...
According to man clock_gettime:
CLOCK_MONOTONIC
       Clock that cannot be set and  represents  monotonic  time  since
       some unspecified starting point.
So in theory it is possible to have a posix OS in which CLOCK_MONOTONIC
is larger than CLOCK_REALTIME. And even if monotoic clock is uptime
sleeping untill the uptime matches epoch time at the beginning of the
sleep will not be a particularly good plan. But anyway it's only a
theoretical issue.

Sigmund
> 
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> 

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list