[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] slirp: Use monotonic clock if available
From: |
Ed Swierk |
Subject: |
Re: [Qemu-devel] [PATCH] slirp: Use monotonic clock if available |
Date: |
Thu, 23 Jul 2009 00:57:08 +0000 |
On Wed, Jul 22, 2009 at 11:38 PM, malc<address@hidden> wrote:
> This is wrong on many levels.
>
> Suppose CLOCK_MONOTONIC(which is wrong _POSIX_MONOTONIC_CLOCK ought to
> be checked) is defined and you compile your binary on, say, Linux 2.6
> and then try to run it on 2.4 (without any fancy RHEL patches for
> instance), things wouldn't work, what's worse they wouldn't work
> silently, giving no indication what's wrong all because nobody checks
> clock_gettime result for failures.
>
> The CLOCK_MONOTONIC presence ought to be checked at runtime
> (see sysconf(3) and _POSIX_MONOTONIC_CLOCK)
OK, sounds like slirp should just call qemu_get_clock(rt_clock), which
is supposed to deal with all these complications.
--Ed