Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Nov 2011 10:23:37 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-arch@freebsd.org, Jilles Tjoelker <jilles@stack.nl>
Cc:        Ed Schouten <ed@80386.nl>
Subject:   Re: [PATCH] fadvise(2) system call
Message-ID:  <201111011023.37688.jhb@freebsd.org>
In-Reply-To: <201111011001.42775.jhb@freebsd.org>
References:  <201110281426.00013.jhb@freebsd.org> <20111031221627.GR2258@hoeg.nl> <201111011001.42775.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@freebsd.org>, 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111011023.37688.jhb>