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

Daniel Stone daniel at fooishbar.org
Thu Aug 26 19:15:57 PDT 2010


On Fri, Aug 27, 2010 at 09:20:59AM +0800, yakui.zhao at intel.com wrote:
>    Limit the CLOCK_MONOTONIC_COARSE posix timer to linux platform. This is
> to avoid the issue that OS doesn't support CLOCK_MONOTINC_COARSE posix timer
> while the corresponding clock id is for other purpose. At the same time it
> won't be created if the CLOCK_MONOTONIC_COARSE is defined in system header
> file.

... what?? CLOCK_MONOTONIC_COARSE _always_ means the coarse monotonic
clock if defined, on any platform.  It's always safe to use.

Your patch, however, removes the check to make sure the monotonic clock
is working.  Just take the patch I posted previously, make sure it
works, and probably also add a check that
clock_gettime(CLOCK_MONOTONIC_COARSE, &tp) actually works, similar to
the check for CLOCK_MONOTONIC.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100827/da478a99/attachment.pgp>


More information about the xorg-devel mailing list