From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTmcU-0007T0-Pm for qemu-devel@nongnu.org; Wed, 22 Jul 2009 20:57:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTmcQ-0007RP-6l for qemu-devel@nongnu.org; Wed, 22 Jul 2009 20:57:14 -0400 Received: from [199.232.76.173] (port=44904 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTmcQ-0007RF-2j for qemu-devel@nongnu.org; Wed, 22 Jul 2009 20:57:10 -0400 Received: from mail-bw0-f227.google.com ([209.85.218.227]:49426) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTmcP-0000QF-Ng for qemu-devel@nongnu.org; Wed, 22 Jul 2009 20:57:09 -0400 Received: by bwz27 with SMTP id 27so515808bwz.34 for ; Wed, 22 Jul 2009 17:57:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1248302945.14831.4.camel@localhost.localdomain> Date: Thu, 23 Jul 2009 00:57:08 +0000 Message-ID: <9ae48b020907221757i50980003u185b18f1c1940295@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] slirp: Use monotonic clock if available From: Ed Swierk Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org On Wed, Jul 22, 2009 at 11:38 PM, malc 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