Subject: Re: New read & write syscalls
To: None <email@example.com>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 06/30/1999 11:39:12
On Wed, 30 Jun 1999, Ignatios Souvatzis wrote:
> On Wed, Jun 30, 1999 at 11:16:34AM -0700, Bill Studenmund wrote:
> > readwrite(int fd, void *buf, size_t nbyte, int flags, off_t offset)
> > and
> > readwritev(int fd, const struct iovec *iovp, int iovcnt, int flags, off_t
> > offset)
> > The only difference between the two calls is that one takes a pointer to a
> > buffer and a byte count, while the other takes iovec's.
> Something that I've been wondering for a while, but never seemed important...
> why not implement the first as a library call using the 2nd (using alloca
> to create the one-element iovec)?
> (actually, why not reimplent read/write in the same way?)
Speed is the issue which comes to mind. Why add the extra alloc if you
really don't need it? :-)