System calls and 64-bit architectures
Posted Dec 18, 2008 9:51 UTC (Thu) by
meuh (subscriber, #22042)
Parent article:
System calls and 64-bit architectures
Why not extend struct iovec with an offset field:
struct iovecs
{
void *iovs_base;
size_t iovs_len;
off_t iovs_off;
};
ssize_t preadv(int d, const struct iovecs *iovs, int iovcnt);
ssize_t pwritev(int d, const struct iovecs *iovs, int iovcnt);
Bad things could happen if offsets are going backward:performance penality or data overlapping. And this kind of interface are not the best regarding to error report.
So the kernel would have to enforce (iovs[n].iovs_off + iovs[n].iovs_len) < iovs[n+1].iovs_off
(
Log in to post comments)