Subject: Re: letting userland issue FUA writes
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 03/20/2006 02:56:34
> struct iovec {
> void *iov_base;
> size_t iov_len;
> uint32_t flags;
> };
If you're going to do this, _please_ do a const-poisoning-friendly
version! Off the cuff, I'd suggest something like
struct iovec_f {
union {
void *iovu_base_r;
const void *iovu_base_w;
} iov_u;
#define iov_base_r iov_u.iovu_base_r
#define iov_base_w iov_u.iovu_base_w
...other members...
} ;
I'm not sure whether it's worth having volatile-modified versions as
well - I've never wanted them, but that doesn't necessarily mean much.
The incompatability between writev() and const-poisoning is perhaps the
most annoying single thing about writev, in my experience....
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B