From owner-freebsd-current@FreeBSD.ORG Mon Apr 30 21:10:33 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AC11216A40D; Mon, 30 Apr 2007 21:10:33 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7D73413C459; Mon, 30 Apr 2007 21:10:33 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 29D6D46E14; Mon, 30 Apr 2007 17:10:33 -0400 (EDT) Date: Mon, 30 Apr 2007 22:10:33 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= In-Reply-To: <86bqh5ppau.fsf@dwp.des.no> Message-ID: <20070430220936.W30345@fledge.watson.org> References: <20070423113400.GC28587@gw.humppa.dk> <462CD251.9060105@freebsd.org> <20070423161711.GV39474@elvis.mu.org> <462D821F.6030707@freebsd.org> <20070424042102.GI38475@tnn.dglawrence.com> <86veflholn.fsf@dwp.des.no> <20070428113752.A28395@fledge.watson.org> <4633299B.2020206@dlr.de> <20070428121554.T28395@fledge.watson.org> <86bqh5ppau.fsf@dwp.des.no> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1592702062-1177967433=:30345" Cc: current@freebsd.org, Hartmut Brandt , Tim Kientzle , David G Lawrence , "Jesper B. Rosenkilde" Subject: Re: Suggestions on Avoiding syscall Overhead X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2007 21:10:33 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1592702062-1177967433=:30345 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 30 Apr 2007, Dag-Erling Sm=F8rgrav wrote: > Robert Watson writes: > >> Unfortunately, this sort of thing can't be expressed using the standard= =20 >> APIs. This leaves us two choices: allow the behavior of standard APIs to= be=20 >> configured at some granularity, or introduce new APIs. My feeling is we= =20 >> should prefer new APIs, and suggest that programmers use those. Take a= =20 >> look at sys/sys/time.h:1.71 for an example of what might make sense. > > I'm not sure this is a good example. > > There is already a suitable extensible API: clock_gettime(), which is par= t=20 > of SUSv3. Define new CLOCK_* constants for requesting a faster, less=20 > precise timecounter, and if you feel like it, submit it to X/Open for=20 > inclusion in the next version of the SUS. You didn't look at that CVS revision, did you? The contrast being drawn here is between extending the API (that includes= =20 constants) and doing something like having environmental variables or other= =20 stuff change the definition of existing APIs (CLOCK_REALTIME, gettimeofday(= ),=20 etc). Robert N M Watson Computer Laboratory University of Cambridge --0-1592702062-1177967433=:30345--