[PATCH_v2] use CLOCK_MONOTONIC_COARSE posix timer instead of CLOCK_MONOTONIC in Xorg

Alan Coopersmith alan.coopersmith at oracle.com
Fri Aug 27 08:01:56 PDT 2010


ykzhao wrote:
> But in the discussion of V1 version, it seems that it is not reasonable
> for other OS. Maybe the CLOCK_MONOTONIC_COARSE posix timer is not
> supported. But the corresponding clock id is used for other purpose. In
> such case it will be not safe.

If clock id 6 is used for another purpose on the platform, then
CLOCK_MONOTONIC_COARSE won't be defined to be 6 by the platform headers.
(If they do, it's a platform bug they need to fix.)

The point of the objections was that you should not use the hardcoded value 6
on all platforms but instead rely on platform headers to provide the correct
definition of CLOCK_MONOTONIC_COARSE.   The only thing that checking for
linux was suggested for was if you were going to define it yourself, since
you know for that one platform CLOCK_MONOTONIC_COARSE will have the value 6.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list