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

ykzhao yakui.zhao at intel.com
Wed Aug 25 22:48:26 PDT 2010


On Tue, 2010-08-24 at 17:02 +0800, Mikhail Gusarov wrote:
> Twas brillig at 16:45:34 24.08.2010 UTC+08 when yakui.zhao at intel.com did gyre and gimble:
> 
>  y> What side effect will it bring if we define it explicitly and use it
>  y> when it is not defined in system header?
> 
> Bad side-effect is X.org becoming OS again :) It isn't hard to require
> newer linux-libc-dev headers for CLOCK_MONOTONIC_COARSE definition.

How about limiting it to linux platform as mentioned by Samuel
Thibault?

The change of this patch happens in the file of os/utils.c, which has
the dependency on the OS. Not sure whether it will be too strict that
the glibc header file needs to be updated in order to use the
CLOCK_MONOTONIC_COARSE posix timer. 

Now some latest linux distribution already adds the definition of
CLOCK_MONOTONIC_COARSE. But on the previous distribution, the user still
can enjoy the benefit of using CLOCK_MONOTONIC_COARSE posix timer after
updating the linux kernel while the gcc tool doesn't need to be updated.

Thanks.
   yakui
> 



More information about the xorg-devel mailing list