qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Add configure clock_gettime() monotonic time te


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] Add configure clock_gettime() monotonic time test
Date: Tue, 2 Apr 2013 23:52:48 +0100

On 2 April 2013 17:45, Paolo Bonzini <address@hidden> wrote:
> Il 02/04/2013 17:42, Brad Smith ha scritto:
>> Replace the hardcoded list of OS's utilizing clock_gettime() for monotonic
>> time with a configure test. This is to fix the use of monotonic time on
>> OpenBSD but allows for other POSIX compliant OS's such as NetBSD to also
>> utilize clock_gettime().
>
> I thought the list of OSes was supposed to filter out those that somehow
> had a broken CLOCK_MONOTONIC.

Judging from wading through git history, it's mostly just
historic accretion from an initial #ifdef __linux__ which was
put in by Fabrice way back when configure was barely doing
compile-this-code checks at all.

Google does suggest that some OSes do provide a CLOCK_MONOTONIC
but clock_gettime(CLOCK_MONOTONIC) always fails, eg Centos 3.

> Otherwise, you might as well use "#ifdef CLOCK_MONOTONIC" and skip the
> configure test completely.

Tempting.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]