Re: fadvise syscall?

Mark Mielke
2002-03-18T17:33:58Z

On Mon, Mar 18, 2002 at 05:08:02AM -0500, Jeff Garzik wrote:
> Jan Hudec wrote:
> >Then posix_fadvise interface can be implemented in libc using fcntl.
> It is far better for future-proofing the interface IMO if fadvise is
> implementing directly. Hints are less important than open O_xxx flags
> or F_xxx flags, because an implementation can safely ignore 100% of the
> fadvise hints, if it so chooses. One cannot say the same thing for
> open/fcntl flags.

There is nothing to say that fadvise(...) shouldn't call fcntl(F_ADVISE, ...).

If it fits in with open(), then it might just fit in with F_GETFL /
F_SETFL as well.

I prefer generalization, especially for non-critical functions that should
not be called 1,000,000 a second, such as fadvise().

mark

--
mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ |
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada

One ring to rule them all, one ring to find them, one ring to bring them all
and in the darkness bind them...