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

Pauli Nieminen suokkos at gmail.com
Thu Aug 26 02:55:54 PDT 2010


On Thu, Aug 26, 2010 at 8:48 AM, ykzhao <yakui.zhao at intel.com> wrote:
> 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.
>

That use case is very unlikely to happen excluding developers. Nearly
everyone else will be using this patch in system with new enough
headers that do define CLOCK_MONOTIC_COARSE.

> Thanks.
>   yakui
>>
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list