From owner-freebsd-arch@FreeBSD.ORG Tue Nov 1 14:23:39 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26725106564A for ; Tue, 1 Nov 2011 14:23:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E65358FC17 for ; Tue, 1 Nov 2011 14:23:38 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9AFCA46B0D; Tue, 1 Nov 2011 10:23:38 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2B2BD8A02E; Tue, 1 Nov 2011 10:23:38 -0400 (EDT) From: John Baldwin To: freebsd-arch@freebsd.org, Jilles Tjoelker Date: Tue, 1 Nov 2011 10:23:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201110281426.00013.jhb@freebsd.org> <20111031221627.GR2258@hoeg.nl> <201111011001.42775.jhb@freebsd.org> In-Reply-To: <201111011001.42775.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201111011023.37688.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 01 Nov 2011 10:23:38 -0400 (EDT) Cc: Ed Schouten Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Nov 2011 14:23:39 -0000 On Tuesday, November 01, 2011 10:01:42 am John Baldwin wrote: > On Monday, October 31, 2011 6:16:27 pm Ed Schouten wrote: > > Hi John, > > > > * John Baldwin , 20111031 22:17: > > > I also really do think that posix_*() truly is far uglier to read. In the > > > worst case, imagine something like this: > > > > > > char *cp; > > > > > > cp = posix_malloc(posix_strlen(some_string) + 1); > > > posix_strcpy(cp, s); > > > posix_printf("%s\n", cp); > > > > > > *blech* > > > > I do agree it's ugly, but at least it's standardized. The fact is that > > it's easier to explain to someone "this code doesn't build on $NONBSD, > > because $NONBSD lacks POSIX conformance" than saying "this code doesn't > > build on $NONBSD because it uses BSD-specific crap". As I mentioned > > previously, there is no fadvise() on Linux. There's no gain in > > compatibility by implementing it -- it's just syntactic sugar. > > Hmmm, there is an fadvise(2) manpage. I had presumed from that it was > a public interface. A reworked patch is at www.freebsd.org/~jhb/patches/posix_fadvise.patch A universe build is going. I also noticed we currently use stubs for the linux fadvise() system call. Once this is in we should be able to replace the stubs with calls to the new system call instead. -- John Baldwin