qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH] slirp: Use monotonic clock if available


From: Jan Kiszka
Subject: [Qemu-devel] Re: [PATCH] slirp: Use monotonic clock if available
Date: Thu, 23 Jul 2009 08:40:02 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Ed Swierk wrote:
> 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.

Exactly.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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