This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] Re: [RFC PATCH 03/35] Add Xen interface header files

On 9 May 2006, at 21:40, Hollis Blanchard wrote:

The scatter/gather lists are still needed, but they are hidden inside

If you change "unsigned long *" to an integer-based guest_handle_t, you
will lose type-checking when accessing it, and I believe that's why you
created these macros. I'm not particularly worried about type-checking,
so I'd be happy to see them go, as long as we still have typedefs

It's tempting. We can still ensure that those fields are only accessed via the correct functions by making the typedef structural. All we lose is the ability to discriminate between different types of handles. Still, it is nice to get some kind of hint from the handle definition the type of the thing that it references. I wouldn't trust a comment beside each guest-handle field to be kept up to date. Having the type passed to the guest_handle() macro does get us some self documentation.

However, macro or no macro: even reducing it to just a typedef won't get past some of the guys on lkml without a fight.

 -- Keir

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>