From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YznVk-0005p9-SU for qemu-devel@nongnu.org; Tue, 02 Jun 2015 10:49:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YznVg-0002Wd-Rh for qemu-devel@nongnu.org; Tue, 02 Jun 2015 10:49:48 -0400 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:34399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YznVg-0002WW-Kt for qemu-devel@nongnu.org; Tue, 02 Jun 2015 10:49:44 -0400 Received: by wibut5 with SMTP id ut5so71928865wib.1 for ; Tue, 02 Jun 2015 07:49:44 -0700 (PDT) Date: Tue, 2 Jun 2015 15:49:41 +0100 From: Stefan Hajnoczi Message-ID: <20150602144941.GB8199@stefanha-thinkpad.redhat.com> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BwCQnh7xodEAoBMC" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] FreeBSD clock_gettime() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sai Prajeeth Cc: QEMU Developers --BwCQnh7xodEAoBMC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, May 31, 2015 at 07:11:25PM +0530, Sai Prajeeth wrote: > I have done experiments and it seems that FreeBSD's libc function > clock_gettime() results in a system call when running on QEMU whereas on > hardware it does not. Does anybody know why? For those interested , you can > find the clock_gettime libc call in freebsd source here: > https://github.com/lattera/freebsd/blob/master/lib/libc/sys/clock_gettime.c This is more of a FreeBSD kernel question than a QEMU question. I don't have time to dig into the FreeBSD sources but you should be able to find the answer there. Check out the FreeBSD kernel's vdso implementation. Linux has something similar, it's a library mapped into userspace processes that is provided by the kernel. It includes low-level utilities that depend on the specific kernel. Stefan --BwCQnh7xodEAoBMC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVbcKFAAoJEJykq7OBq3PIjv4H/3vei1zyjqM9cvp+/XGhvdGS C2W39ODB3j2g5aI/OKxtJAL7p52jqDYd5YZobww0F5Vr8LghWYU/f9NMDzirXA5k nlQvF82IFczHfB8t9JplGiExYsxbqZVScQApinWbpAyNt3MfwD76LVySuqVMHaYH 4H9LHpRDj15u7+DCETW2PPVKIwd2ed32v+JIkU81ZiKv/ohyTkJo6ykRuFs43R3/ 3bB48sOS4NGLpnfnxB/R22i8C5LzDfDYncpjR4ifMgSI+Okg1F3V9FSmQ4HNsuVP UEbP7kX5F7F3aSyrOQstfIWB54N9S6xCVZcg7meh9cSClKICli08GusKLtaTNQQ= =MfKj -----END PGP SIGNATURE----- --BwCQnh7xodEAoBMC--