Subject: Re: New read & write syscalls
To: None <firstname.lastname@example.org>
From: Chris G. Demetriou <email@example.com>
Date: 06/30/1999 11:40:30
Ignatios Souvatzis <firstname.lastname@example.org> writes:
> 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?)
I would guess that the answer to this is:
non-iovec is the common case, _and_ creating the iovec in user-land is
going to make for a slower syscall (have to copy it in, rather than
just get the information from the syscall args, do more error checking
because of the possible iovec cases, etc.).
So why penalize the common case?
In any case before a flameware erupts, re: the existing readv/writev
vs. read/write: IT AIN'T BROKE, SO DON'T PROPOSE TO FIX IT!!! 8-)
Chris Demetriou - email@example.com - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.