tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: iovec member reuse
On Sun, Jan 18, 2009 at 04:21:43PM +0000, Iain Hibbert wrote:
> Query: is it safe to re-use an iovec array without re-initialising it?
In userspace, yes. The documentation of readv and writev says that the
iov array is const, and that probably means standards say so also,
although I haven't looked.
But, note that iovecs that are placed in struct uio in the kernel are
*not* const; uiomove advances the pointers as data is transferred.
For the system calls this is done on an in-kernel copy that isn't
written back.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index